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

Side by Side Diff: chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h

Issue 1181263007: WebView context menu cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment. Created 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
7 7
8 #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h" 8 #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h"
9 #include "extensions/browser/guest_view/web_view/web_view_guest.h" 9 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
10 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" 10 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h"
(...skipping 11 matching lines...) Expand all
22 namespace extensions { 22 namespace extensions {
23 23
24 class ChromeWebViewGuestDelegate : public WebViewGuestDelegate { 24 class ChromeWebViewGuestDelegate : public WebViewGuestDelegate {
25 public : 25 public :
26 explicit ChromeWebViewGuestDelegate(WebViewGuest* web_view_guest); 26 explicit ChromeWebViewGuestDelegate(WebViewGuest* web_view_guest);
27 ~ChromeWebViewGuestDelegate() override; 27 ~ChromeWebViewGuestDelegate() override;
28 28
29 // WebViewGuestDelegate implementation. 29 // WebViewGuestDelegate implementation.
30 bool HandleContextMenu(const content::ContextMenuParams& params) override; 30 bool HandleContextMenu(const content::ContextMenuParams& params) override;
31 void OnDidInitialize() override; 31 void OnDidInitialize() override;
32 void OnGuestDestroyed() override;
33 void OnShowContextMenu(int request_id, const MenuItemVector* items) override; 32 void OnShowContextMenu(int request_id, const MenuItemVector* items) override;
34 33
35 WebViewGuest* web_view_guest() const { return web_view_guest_; } 34 WebViewGuest* web_view_guest() const { return web_view_guest_; }
36 35
37 private: 36 private:
38 content::WebContents* guest_web_contents() const { 37 content::WebContents* guest_web_contents() const {
39 return web_view_guest()->web_contents(); 38 return web_view_guest()->web_contents();
40 } 39 }
41 40
42 // Returns the top level items (ignoring submenus) as Value. 41 // Returns the top level items (ignoring submenus) as Value.
(...skipping 30 matching lines...) Expand all
73 // This is used to ensure pending tasks will not fire after this object is 72 // This is used to ensure pending tasks will not fire after this object is
74 // destroyed. 73 // destroyed.
75 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; 74 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_;
76 75
77 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); 76 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate);
78 }; 77 };
79 78
80 } // namespace extensions 79 } // namespace extensions
81 80
82 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 81 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
83
OLDNEW
« no previous file with comments | « chrome/browser/extensions/menu_manager.cc ('k') | chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698