Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: content/shell/shell_web_contents_view_delegate.h

Issue 10913035: Add context popup menu support for content shell[GTK]. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_SHELL_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_
6 #define CONTENT_SHELL_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_
7
8 #include "content/public/browser/web_contents.h"
9 #include "content/public/browser/web_contents_view_delegate.h"
10 #include "content/public/common/context_menu_params.h"
11
12 #if defined(TOOLKIT_GTK)
13 #include "ui/base/gtk/gtk_signal.h"
14 #include "ui/base/gtk/owned_widget_gtk.h"
15 #endif
16
17 namespace content {
18
19 class ShellWebContentsViewDelegate : public WebContentsViewDelegate {
20 public:
21 explicit ShellWebContentsViewDelegate(WebContents* web_contents);
22 virtual ~ShellWebContentsViewDelegate();
23
24 // Overridden from WebContentsViewDelegate:
25 virtual void ShowContextMenu(
26 const ContextMenuParams& params) OVERRIDE;
27 virtual WebDragDestDelegate* GetDragDestDelegate() OVERRIDE;
28
29 #if defined(TOOLKIT_GTK)
30 virtual void Initialize(GtkWidget* expanded_container,
31 ui::FocusStoreGtk* focus_store) OVERRIDE;
32 virtual gfx::NativeView GetNativeView() const OVERRIDE;
33 virtual void Focus() OVERRIDE;
34 virtual gboolean OnNativeViewFocusEvent(GtkWidget* widget,
35 GtkDirectionType type,
36 gboolean* return_value) OVERRIDE;
37 #endif
38
39 private:
40 WebContents* web_contents_;
41 ContextMenuParams params_;
42
43 #if defined(TOOLKIT_GTK)
44 ui::OwnedWidgetGtk floating_;
45 GtkWidget* expanded_container_;
46
47 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
48 OnBackMenuActivated);
49 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
50 OnForwardMenuActivated);
51 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
52 OnReloadMenuActivated);
53 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
54 OnOpenURLMenuActivated);
55 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
56 OnCutMenuActivated);
57 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
58 OnCopyMenuActivated);
59 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
60 OnPasteMenuActivated);
61 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
62 OnDeleteMenuActivated);
63 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void,
64 OnInspectMenuActivated);
65 #endif
66 };
jochen (gone - plz use gerrit) 2012/08/31 20:58:58 please add DISALLOW_COPY_AND_ASSIGN(ShellWebConten
Shouqun Liu 2012/08/31 21:34:20 Done.
67
68 } // namespace content
69
70 #endif // CONTENT_SHELL_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698