OLD | NEW |
---|---|
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 CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 class BrowserContext; | 63 class BrowserContext; |
64 class BrowserMainParts; | 64 class BrowserMainParts; |
65 class RenderProcessHost; | 65 class RenderProcessHost; |
66 class QuotaPermissionContext; | 66 class QuotaPermissionContext; |
67 class ResourceContext; | 67 class ResourceContext; |
68 class RenderViewHost; | 68 class RenderViewHost; |
69 class SiteInstance; | 69 class SiteInstance; |
70 class SpeechInputManagerDelegate; | 70 class SpeechInputManagerDelegate; |
71 class WebContents; | 71 class WebContents; |
72 class WebContentsView; | 72 class WebContentsView; |
73 class WebContentsViewDelegate; | |
73 class WebUIControllerFactory; | 74 class WebUIControllerFactory; |
74 struct MainFunctionParams; | 75 struct MainFunctionParams; |
75 struct ShowDesktopNotificationHostMsgParams; | 76 struct ShowDesktopNotificationHostMsgParams; |
76 | 77 |
77 typedef base::Callback< void(const content::MediaStreamDevices&) > | 78 typedef base::Callback< void(const content::MediaStreamDevices&) > |
78 MediaResponseCallback; | 79 MediaResponseCallback; |
79 | 80 |
80 // Embedder API (or SPI) for participating in browser logic, to be implemented | 81 // Embedder API (or SPI) for participating in browser logic, to be implemented |
81 // by the client of the content browser. See ChromeContentBrowserClient for the | 82 // by the client of the content browser. See ChromeContentBrowserClient for the |
82 // principal implementation. The methods are assumed to be called on the UI | 83 // principal implementation. The methods are assumed to be called on the UI |
83 // thread unless otherwise specified. Use this "escape hatch" sparingly, to | 84 // thread unless otherwise specified. Use this "escape hatch" sparingly, to |
84 // avoid the embedder interface ballooning and becoming very specific to Chrome. | 85 // avoid the embedder interface ballooning and becoming very specific to Chrome. |
85 // (Often, the call out to the client can happen in a different part of the code | 86 // (Often, the call out to the client can happen in a different part of the code |
86 // that either already has a hook out to the embedder, or calls out to one of | 87 // that either already has a hook out to the embedder, or calls out to one of |
87 // the observer interfaces.) | 88 // the observer interfaces.) |
88 class ContentBrowserClient { | 89 class ContentBrowserClient { |
89 public: | 90 public: |
90 virtual ~ContentBrowserClient() {} | 91 virtual ~ContentBrowserClient() {} |
91 | 92 |
92 // Allows the embedder to set any number of custom BrowserMainParts | 93 // Allows the embedder to set any number of custom BrowserMainParts |
93 // implementations for the browser startup code. See comments in | 94 // implementations for the browser startup code. See comments in |
94 // browser_main_parts.h. | 95 // browser_main_parts.h. |
95 virtual BrowserMainParts* CreateBrowserMainParts( | 96 virtual BrowserMainParts* CreateBrowserMainParts( |
96 const content::MainFunctionParams& parameters) = 0; | 97 const content::MainFunctionParams& parameters) = 0; |
97 | 98 |
98 virtual WebContentsView* CreateWebContentsView(WebContents* web_contents) = 0; | 99 // Allows an embedder to return their own WebContentsView implementation. |
100 // Return NULL to let the default one for the platform be created. | |
101 virtual WebContentsView* OverrideCreateWebContentsView( | |
102 WebContents* web_contents) = 0; | |
103 | |
104 // If content creates the WebContentsView implementation, it will ask the | |
105 // embedder to return an (optional) delegate to customize it. | |
Avi (use Gerrit)
2012/03/14 20:48:24
You may want to clarify that content will take own
jam
2012/03/14 20:59:26
Done.
| |
106 virtual WebContentsViewDelegate* GetWebContentsViewDelegate( | |
107 WebContents* web_contents) = 0; | |
99 | 108 |
100 // Notifies that a new RenderHostView has been created. | 109 // Notifies that a new RenderHostView has been created. |
101 virtual void RenderViewHostCreated( | 110 virtual void RenderViewHostCreated( |
102 content::RenderViewHost* render_view_host) = 0; | 111 content::RenderViewHost* render_view_host) = 0; |
103 | 112 |
104 // Notifies that a RenderProcessHost has been created. This is called before | 113 // Notifies that a RenderProcessHost has been created. This is called before |
105 // the content layer adds its own BrowserMessageFilters, so that the | 114 // the content layer adds its own BrowserMessageFilters, so that the |
106 // embedder's IPC filters have priority. | 115 // embedder's IPC filters have priority. |
107 virtual void RenderProcessHostCreated( | 116 virtual void RenderProcessHostCreated( |
108 content::RenderProcessHost* host) = 0; | 117 content::RenderProcessHost* host) = 0; |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
403 // This is called on a worker thread. | 412 // This is called on a worker thread. |
404 virtual | 413 virtual |
405 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 414 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
406 const GURL& url) = 0; | 415 const GURL& url) = 0; |
407 #endif | 416 #endif |
408 }; | 417 }; |
409 | 418 |
410 } // namespace content | 419 } // namespace content |
411 | 420 |
412 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 421 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |