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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (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 (c) 2012 The Chromium Authors. All rights reserved. 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 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_UI_COCOA_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_M AC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_M AC_H_
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_M AC_H_ 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_M AC_H_
7 7
8 #if defined(__OBJC__) 8 #if defined(__OBJC__)
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 10 matching lines...) Expand all
21 class WebContents; 21 class WebContents;
22 } 22 }
23 23
24 // A chrome/ specific class that extends WebContentsViewMac with features that 24 // A chrome/ specific class that extends WebContentsViewMac with features that
25 // live in chrome/. 25 // live in chrome/.
26 class ChromeWebContentsViewDelegateMac 26 class ChromeWebContentsViewDelegateMac
27 : public content::WebContentsViewDelegate, 27 : public content::WebContentsViewDelegate,
28 public ContextMenuDelegate { 28 public ContextMenuDelegate {
29 public: 29 public:
30 explicit ChromeWebContentsViewDelegateMac(content::WebContents* web_contents); 30 explicit ChromeWebContentsViewDelegateMac(content::WebContents* web_contents);
31 virtual ~ChromeWebContentsViewDelegateMac(); 31 ~ChromeWebContentsViewDelegateMac() override;
32 32
33 // Overridden from WebContentsViewDelegate: 33 // Overridden from WebContentsViewDelegate:
34 virtual NSObject<RenderWidgetHostViewMacDelegate>* 34 NSObject<RenderWidgetHostViewMacDelegate>* CreateRenderWidgetHostViewDelegate(
35 CreateRenderWidgetHostViewDelegate( 35 content::RenderWidgetHost* render_widget_host) override;
36 content::RenderWidgetHost* render_widget_host) override; 36 content::WebDragDestDelegate* GetDragDestDelegate() override;
37 virtual content::WebDragDestDelegate* GetDragDestDelegate() override; 37 void ShowContextMenu(content::RenderFrameHost* render_frame_host,
38 virtual void ShowContextMenu( 38 const content::ContextMenuParams& params) override;
39 content::RenderFrameHost* render_frame_host,
40 const content::ContextMenuParams& params) override;
41 39
42 // Overridden from ContextMenuDelegate. 40 // Overridden from ContextMenuDelegate.
43 virtual scoped_ptr<RenderViewContextMenu> BuildMenu( 41 scoped_ptr<RenderViewContextMenu> BuildMenu(
44 content::WebContents* web_contents, 42 content::WebContents* web_contents,
45 const content::ContextMenuParams& params) override; 43 const content::ContextMenuParams& params) override;
46 virtual void ShowMenu(scoped_ptr<RenderViewContextMenu> menu) override; 44 void ShowMenu(scoped_ptr<RenderViewContextMenu> menu) override;
47 45
48 private: 46 private:
49 content::RenderWidgetHostView* GetActiveRenderWidgetHostView(); 47 content::RenderWidgetHostView* GetActiveRenderWidgetHostView();
50 48
51 // The context menu. Callbacks are asynchronous so we need to keep it around. 49 // The context menu. Callbacks are asynchronous so we need to keep it around.
52 scoped_ptr<RenderViewContextMenuMac> context_menu_; 50 scoped_ptr<RenderViewContextMenuMac> context_menu_;
53 51
54 // The chrome specific delegate that receives events from WebDragDestMac. 52 // The chrome specific delegate that receives events from WebDragDestMac.
55 scoped_ptr<WebDragBookmarkHandlerMac> bookmark_handler_; 53 scoped_ptr<WebDragBookmarkHandlerMac> bookmark_handler_;
56 54
57 // The WebContents that owns the view. 55 // The WebContents that owns the view.
58 content::WebContents* web_contents_; 56 content::WebContents* web_contents_;
59 57
60 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateMac); 58 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateMac);
61 }; 59 };
62 60
63 #endif // __OBJC__ 61 #endif // __OBJC__
64 62
65 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGAT E_MAC_H_ 63 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGAT E_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698