blob: a58b9d54dc5df4da60e9a0c2d2404d1295e6d693 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_CONTEXT_MENU_CLIENT_IMPL_H__
#define WEBKIT_GLUE_CONTEXT_MENU_CLIENT_IMPL_H__
#pragma warning(push, 0)
#include "ContextMenuClient.h"
#pragma warning(pop)
class WebViewImpl;
// Handles window-level notifications from WebCore on behalf of a WebView.
class ContextMenuClientImpl : public WebCore::ContextMenuClient {
public:
ContextMenuClientImpl(WebViewImpl* webview) : webview_(webview) {
}
virtual ~ContextMenuClientImpl();
virtual void contextMenuDestroyed();
virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(
WebCore::ContextMenu*);
virtual void contextMenuItemSelected(WebCore::ContextMenuItem*,
const WebCore::ContextMenu*);
virtual void downloadURL(const WebCore::KURL&);
virtual void copyImageToClipboard(const WebCore::HitTestResult&);
virtual void searchWithGoogle(const WebCore::Frame*);
virtual void lookUpInDictionary(WebCore::Frame*);
virtual void speak(const WebCore::String&);
virtual void stopSpeaking();
virtual bool shouldIncludeInspectElementItem();
private:
WebViewImpl* webview_; // weak pointer
};
#endif // WEBKIT_GLUE_CONTEXT_MENU_CLIENT_IMPL_H__
|