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

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

Issue 2132983002: Move content shell context menu to ShellWebContentsViewDelegate in Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ 6 #define CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_contents_view_delegate.h" 11 #include "content/public/browser/web_contents_view_delegate.h"
12 #include "content/public/common/context_menu_params.h" 12 #include "content/public/common/context_menu_params.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class ShellWebContentsViewDelegate : public WebContentsViewDelegate { 16 class ShellWebContentsViewDelegate : public WebContentsViewDelegate {
17 public: 17 public:
18 explicit ShellWebContentsViewDelegate(WebContents* web_contents); 18 explicit ShellWebContentsViewDelegate(WebContents* web_contents);
19 ~ShellWebContentsViewDelegate() override; 19 ~ShellWebContentsViewDelegate() override;
20 20
21 // Overridden from WebContentsViewDelegate: 21 // Overridden from WebContentsViewDelegate:
22 void ShowContextMenu(RenderFrameHost* render_frame_host, 22 void ShowContextMenu(RenderFrameHost* render_frame_host,
23 const ContextMenuParams& params) override; 23 const ContextMenuParams& params) override;
24 24
25 #if defined(OS_MACOSX) 25 #if defined(OS_MACOSX)
26 void ActionPerformed(int id); 26 void ActionPerformed(int id);
27 #elif defined(OS_WIN)
28 void MenuItemSelected(int selection);
29 #endif 27 #endif
30 28
31 private: 29 private:
32 WebContents* web_contents_; 30 WebContents* web_contents_;
31 #if defined(OS_MACOSX)
33 ContextMenuParams params_; 32 ContextMenuParams params_;
33 #endif
34 34
35 DISALLOW_COPY_AND_ASSIGN(ShellWebContentsViewDelegate); 35 DISALLOW_COPY_AND_ASSIGN(ShellWebContentsViewDelegate);
36 }; 36 };
37 37
38 } // namespace content 38 } // namespace content
39 39
40 #endif // CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ 40 #endif // CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698