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

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

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 "chrome/browser/ui/zoom/zoom_observer.h" 9 #include "chrome/browser/ui/zoom/zoom_observer.h"
10 #include "extensions/browser/guest_view/web_view/web_view_guest.h" 10 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
11 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" 11 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h"
12 12
13 #if defined(OS_CHROMEOS) 13 #if defined(OS_CHROMEOS)
14 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 14 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
15 #endif 15 #endif
16 16
17 class RenderViewContextMenu; 17 class RenderViewContextMenu;
18 18
19 namespace ui { 19 namespace ui {
20 class SimpleMenuModel; 20 class SimpleMenuModel;
21 } // namespace ui 21 } // namespace ui
22 22
23 class ChromeWebViewGuestDelegate : public extensions::WebViewGuestDelegate, 23 class ChromeWebViewGuestDelegate : public extensions::WebViewGuestDelegate,
24 public ZoomObserver { 24 public ZoomObserver {
25 public : 25 public :
26 explicit ChromeWebViewGuestDelegate( 26 explicit ChromeWebViewGuestDelegate(
27 extensions::WebViewGuest* web_view_guest); 27 extensions::WebViewGuest* web_view_guest);
28 virtual ~ChromeWebViewGuestDelegate(); 28 ~ChromeWebViewGuestDelegate() override;
29 29
30 // WebViewGuestDelegate implementation. 30 // WebViewGuestDelegate implementation.
31 virtual double GetZoom() override; 31 double GetZoom() override;
32 virtual bool HandleContextMenu( 32 bool HandleContextMenu(const content::ContextMenuParams& params) override;
33 const content::ContextMenuParams& params) override; 33 void OnAttachWebViewHelpers(content::WebContents* contents) override;
34 virtual void OnAttachWebViewHelpers(content::WebContents* contents) override; 34 void OnDidAttachToEmbedder() override;
35 virtual void OnDidAttachToEmbedder() override; 35 void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) override;
36 virtual void OnDidCommitProvisionalLoadForFrame(bool is_main_frame) override; 36 void OnDidInitialize() override;
37 virtual void OnDidInitialize() override; 37 void OnDocumentLoadedInFrame(
38 virtual void OnDocumentLoadedInFrame(
39 content::RenderFrameHost* render_frame_host) override; 38 content::RenderFrameHost* render_frame_host) override;
40 virtual void OnGuestReady() override; 39 void OnGuestReady() override;
41 virtual void OnGuestDestroyed() override; 40 void OnGuestDestroyed() override;
42 virtual void OnSetZoom(double zoom_factor) override; 41 void OnSetZoom(double zoom_factor) override;
43 virtual void OnShowContextMenu( 42 void OnShowContextMenu(int request_id, const MenuItemVector* items) override;
44 int request_id,
45 const MenuItemVector* items) override;
46 43
47 // ZoomObserver implementation. 44 // ZoomObserver implementation.
48 virtual void OnZoomChanged( 45 void OnZoomChanged(const ZoomController::ZoomChangedEventData& data) override;
49 const ZoomController::ZoomChangedEventData& data) override;
50 46
51 extensions::WebViewGuest* web_view_guest() const { return web_view_guest_; } 47 extensions::WebViewGuest* web_view_guest() const { return web_view_guest_; }
52 48
53 private: 49 private:
54 content::WebContents* guest_web_contents() const { 50 content::WebContents* guest_web_contents() const {
55 return web_view_guest()->web_contents(); 51 return web_view_guest()->web_contents();
56 } 52 }
57 53
58 // Returns the top level items (ignoring submenus) as Value. 54 // Returns the top level items (ignoring submenus) as Value.
59 static scoped_ptr<base::ListValue> MenuModelToValue( 55 static scoped_ptr<base::ListValue> MenuModelToValue(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 87
92 // This is used to ensure pending tasks will not fire after this object is 88 // This is used to ensure pending tasks will not fire after this object is
93 // destroyed. 89 // destroyed.
94 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_; 90 base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_;
95 91
96 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate); 92 DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate);
97 }; 93 };
98 94
99 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ 95 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_
100 96
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698