OLD | NEW |
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_APP_VIEW_APP_VIEW_GUEST_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ |
7 | 7 |
8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
9 #include "extensions/browser/extension_function_dispatcher.h" | 9 #include "extensions/browser/extension_function_dispatcher.h" |
10 #include "extensions/browser/guest_view/app_view/app_view_guest_delegate.h" | 10 #include "extensions/browser/guest_view/app_view/app_view_guest_delegate.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 static bool CompletePendingRequest( | 28 static bool CompletePendingRequest( |
29 content::BrowserContext* browser_context, | 29 content::BrowserContext* browser_context, |
30 const GURL& url, | 30 const GURL& url, |
31 int guest_instance_id, | 31 int guest_instance_id, |
32 const std::string& guest_extension_id); | 32 const std::string& guest_extension_id); |
33 | 33 |
34 static GuestViewBase* Create(content::BrowserContext* browser_context, | 34 static GuestViewBase* Create(content::BrowserContext* browser_context, |
35 int guest_instance_id); | 35 int guest_instance_id); |
36 | 36 |
37 // ExtensionFunctionDispatcher::Delegate implementation. | 37 // ExtensionFunctionDispatcher::Delegate implementation. |
38 virtual WindowController* GetExtensionWindowController() const OVERRIDE; | 38 virtual WindowController* GetExtensionWindowController() const override; |
39 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE; | 39 virtual content::WebContents* GetAssociatedWebContents() const override; |
40 | 40 |
41 // content::WebContentsObserver implementation. | 41 // content::WebContentsObserver implementation. |
42 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 42 virtual bool OnMessageReceived(const IPC::Message& message) override; |
43 | 43 |
44 // content::WebContentsDelegate implementation. | 44 // content::WebContentsDelegate implementation. |
45 virtual bool HandleContextMenu( | 45 virtual bool HandleContextMenu( |
46 const content::ContextMenuParams& params) OVERRIDE; | 46 const content::ContextMenuParams& params) override; |
47 | 47 |
48 // GuestViewBase implementation. | 48 // GuestViewBase implementation. |
49 virtual const char* GetAPINamespace() const OVERRIDE; | 49 virtual const char* GetAPINamespace() const override; |
50 virtual int GetTaskPrefix() const OVERRIDE; | 50 virtual int GetTaskPrefix() const override; |
51 virtual void CreateWebContents( | 51 virtual void CreateWebContents( |
52 const std::string& embedder_extension_id, | 52 const std::string& embedder_extension_id, |
53 int embedder_render_process_id, | 53 int embedder_render_process_id, |
54 const GURL& embedder_site_url, | 54 const GURL& embedder_site_url, |
55 const base::DictionaryValue& create_params, | 55 const base::DictionaryValue& create_params, |
56 const WebContentsCreatedCallback& callback) OVERRIDE; | 56 const WebContentsCreatedCallback& callback) override; |
57 virtual void DidAttachToEmbedder() OVERRIDE; | 57 virtual void DidAttachToEmbedder() override; |
58 virtual void DidInitialize() OVERRIDE; | 58 virtual void DidInitialize() override; |
59 | 59 |
60 private: | 60 private: |
61 AppViewGuest(content::BrowserContext* browser_context, int guest_instance_id); | 61 AppViewGuest(content::BrowserContext* browser_context, int guest_instance_id); |
62 | 62 |
63 virtual ~AppViewGuest(); | 63 virtual ~AppViewGuest(); |
64 | 64 |
65 void OnRequest(const ExtensionHostMsg_Request_Params& params); | 65 void OnRequest(const ExtensionHostMsg_Request_Params& params); |
66 | 66 |
67 void CompleteCreateWebContents(const GURL& url, | 67 void CompleteCreateWebContents(const GURL& url, |
68 const Extension* guest_extension, | 68 const Extension* guest_extension, |
(...skipping 11 matching lines...) Expand all Loading... |
80 // This is used to ensure pending tasks will not fire after this object is | 80 // This is used to ensure pending tasks will not fire after this object is |
81 // destroyed. | 81 // destroyed. |
82 base::WeakPtrFactory<AppViewGuest> weak_ptr_factory_; | 82 base::WeakPtrFactory<AppViewGuest> weak_ptr_factory_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(AppViewGuest); | 84 DISALLOW_COPY_AND_ASSIGN(AppViewGuest); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace extensions | 87 } // namespace extensions |
88 | 88 |
89 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ | 89 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ |
OLD | NEW |