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

Side by Side Diff: extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h

Issue 664933004: Standardize usage of virtual/override/final in extensions/ (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 EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_ H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_ H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_ H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_ H_
7 7
8 #include "extensions/browser/extension_function_dispatcher.h" 8 #include "extensions/browser/extension_function_dispatcher.h"
9 #include "extensions/browser/guest_view/guest_view.h" 9 #include "extensions/browser/guest_view/guest_view.h"
10 10
11 namespace content { 11 namespace content {
12 class WebContents; 12 class WebContents;
13 } // namespace content 13 } // namespace content
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 class MimeHandlerViewGuestDelegate; 17 class MimeHandlerViewGuestDelegate;
18 18
19 class MimeHandlerViewGuest : public GuestView<MimeHandlerViewGuest>, 19 class MimeHandlerViewGuest : public GuestView<MimeHandlerViewGuest>,
20 public ExtensionFunctionDispatcher::Delegate { 20 public ExtensionFunctionDispatcher::Delegate {
21 public: 21 public:
22 static GuestViewBase* Create(content::BrowserContext* browser_context, 22 static GuestViewBase* Create(content::BrowserContext* browser_context,
23 int guest_instance_id); 23 int guest_instance_id);
24 24
25 static const char Type[]; 25 static const char Type[];
26 26
27 // ExtensionFunctionDispatcher::Delegate implementation. 27 // ExtensionFunctionDispatcher::Delegate implementation.
28 virtual WindowController* GetExtensionWindowController() const override; 28 WindowController* GetExtensionWindowController() const override;
29 virtual content::WebContents* GetAssociatedWebContents() const override; 29 content::WebContents* GetAssociatedWebContents() const override;
30 30
31 // GuestViewBase implementation. 31 // GuestViewBase implementation.
32 virtual const char* GetAPINamespace() const override; 32 const char* GetAPINamespace() const override;
33 virtual int GetTaskPrefix() const override; 33 int GetTaskPrefix() const override;
34 virtual void CreateWebContents( 34 void CreateWebContents(const std::string& embedder_extension_id,
35 const std::string& embedder_extension_id, 35 int embedder_render_process_id,
36 int embedder_render_process_id, 36 const GURL& embedder_site_url,
37 const GURL& embedder_site_url, 37 const base::DictionaryValue& create_params,
38 const base::DictionaryValue& create_params, 38 const WebContentsCreatedCallback& callback) override;
39 const WebContentsCreatedCallback& callback) override; 39 void DidAttachToEmbedder() override;
40 virtual void DidAttachToEmbedder() override; 40 void DidInitialize() override;
41 virtual void DidInitialize() override;
42 41
43 // content::BrowserPluginGuestDelegate implementation 42 // content::BrowserPluginGuestDelegate implementation
44 virtual bool Find(int request_id, 43 bool Find(int request_id,
45 const base::string16& search_text, 44 const base::string16& search_text,
46 const blink::WebFindOptions& options, 45 const blink::WebFindOptions& options,
47 bool is_full_page_plugin) override; 46 bool is_full_page_plugin) override;
48 47
49 // WebContentsDelegate implementation. 48 // WebContentsDelegate implementation.
50 virtual void ContentsZoomChange(bool zoom_in) override; 49 void ContentsZoomChange(bool zoom_in) override;
51 virtual void HandleKeyboardEvent( 50 void HandleKeyboardEvent(
52 content::WebContents* source, 51 content::WebContents* source,
53 const content::NativeWebKeyboardEvent& event) override; 52 const content::NativeWebKeyboardEvent& event) override;
54 virtual void FindReply(content::WebContents* web_contents, 53 void FindReply(content::WebContents* web_contents,
55 int request_id, 54 int request_id,
56 int number_of_matches, 55 int number_of_matches,
57 const gfx::Rect& selection_rect, 56 const gfx::Rect& selection_rect,
58 int active_match_ordinal, 57 int active_match_ordinal,
59 bool final_update) override; 58 bool final_update) override;
60 59
61 // content::WebContentsObserver implementation. 60 // content::WebContentsObserver implementation.
62 virtual bool OnMessageReceived(const IPC::Message& message) override; 61 bool OnMessageReceived(const IPC::Message& message) override;
63 62
64 private: 63 private:
65 MimeHandlerViewGuest(content::BrowserContext* browser_context, 64 MimeHandlerViewGuest(content::BrowserContext* browser_context,
66 int guest_instance_id); 65 int guest_instance_id);
67 virtual ~MimeHandlerViewGuest(); 66 ~MimeHandlerViewGuest() override;
68 67
69 void OnRequest(const ExtensionHostMsg_Request_Params& params); 68 void OnRequest(const ExtensionHostMsg_Request_Params& params);
70 69
71 scoped_ptr<MimeHandlerViewGuestDelegate> delegate_; 70 scoped_ptr<MimeHandlerViewGuestDelegate> delegate_;
72 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; 71 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
73 72
74 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest); 73 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest);
75 }; 74 };
76 75
77 } // namespace extensions 76 } // namespace extensions
78 77
79 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUE ST_H_ 78 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUE ST_H_
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/guest_view_manager.h ('k') | extensions/browser/guest_view/test_guest_view_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698