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

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: Addressed comments. Rebased. Created 5 years, 6 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; 32 void OnGuestDestroyed() override {}
Fady Samuel 2015/06/19 18:03:12 Please get rid of this entirely from delegates if
Devlin 2015/06/19 18:05:48 +1.
paulmeyer 2015/06/19 18:18:10 Done.
33 void OnShowContextMenu(int request_id, const MenuItemVector* items) override; 33 void OnShowContextMenu(int request_id, const MenuItemVector* items) override;
34 34
35 WebViewGuest* web_view_guest() const { return web_view_guest_; } 35 WebViewGuest* web_view_guest() const { return web_view_guest_; }
36 36
37 private: 37 private:
38 content::WebContents* guest_web_contents() const { 38 content::WebContents* guest_web_contents() const {
39 return web_view_guest()->web_contents(); 39 return web_view_guest()->web_contents();
40 } 40 }
41 41
42 // Returns the top level items (ignoring submenus) as Value. 42 // 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 73 // This is used to ensure pending tasks will not fire after this object is
74 // destroyed. 74 // destroyed.
75 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; 75 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); 77 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate);
78 }; 78 };
79 79
80 } // namespace extensions 80 } // namespace extensions
81 81
82 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 82 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
83
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698