| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class QuotaPermissionContext; | 25 class QuotaPermissionContext; |
| 26 class RenderViewHost; | 26 class RenderViewHost; |
| 27 class ResourceDispatcherHost; | 27 class ResourceDispatcherHost; |
| 28 class SSLCertErrorHandler; | 28 class SSLCertErrorHandler; |
| 29 class SSLClientAuthHandler; | 29 class SSLClientAuthHandler; |
| 30 class SkBitmap; | 30 class SkBitmap; |
| 31 class TabContents; | 31 class TabContents; |
| 32 class TabContentsView; | 32 class TabContentsView; |
| 33 class WorkerProcessHost; | 33 class WorkerProcessHost; |
| 34 struct DesktopNotificationHostMsg_Show_Params; | 34 struct DesktopNotificationHostMsg_Show_Params; |
| 35 struct MainFunctionParams; |
| 35 struct WebPreferences; | 36 struct WebPreferences; |
| 36 | 37 |
| 38 namespace content { |
| 39 class BrowserMainParts; |
| 40 } |
| 41 |
| 37 namespace crypto { | 42 namespace crypto { |
| 38 class CryptoModuleBlockingPasswordDelegate; | 43 class CryptoModuleBlockingPasswordDelegate; |
| 39 } | 44 } |
| 40 | 45 |
| 41 namespace net { | 46 namespace net { |
| 42 class CookieList; | 47 class CookieList; |
| 43 class CookieOptions; | 48 class CookieOptions; |
| 44 class NetLog; | 49 class NetLog; |
| 45 class URLRequest; | 50 class URLRequest; |
| 46 class URLRequestContext; | 51 class URLRequestContext; |
| 47 class URLRequestContextGetter; | 52 class URLRequestContextGetter; |
| 48 class X509Certificate; | 53 class X509Certificate; |
| 49 } | 54 } |
| 50 | 55 |
| 51 namespace speech_input { | 56 namespace speech_input { |
| 52 class SpeechInputManager; | 57 class SpeechInputManager; |
| 53 } | 58 } |
| 54 | 59 |
| 55 namespace ui { | 60 namespace ui { |
| 56 class Clipboard; | 61 class Clipboard; |
| 57 } | 62 } |
| 58 | 63 |
| 59 namespace content { | 64 namespace content { |
| 60 | 65 |
| 61 class BrowserContext; | 66 class BrowserContext; |
| 67 class BrowserMainParts; |
| 62 class ResourceContext; | 68 class ResourceContext; |
| 63 class WebUIFactory; | 69 class WebUIFactory; |
| 64 | 70 |
| 65 // Embedder API (or SPI) for participating in browser logic, to be implemented | 71 // Embedder API (or SPI) for participating in browser logic, to be implemented |
| 66 // by the client of the content browser. See ChromeContentBrowserClient for the | 72 // by the client of the content browser. See ChromeContentBrowserClient for the |
| 67 // principal implementation. The methods are assumed to be called on the UI | 73 // principal implementation. The methods are assumed to be called on the UI |
| 68 // thread unless otherwise specified. Use this "escape hatch" sparingly, to | 74 // thread unless otherwise specified. Use this "escape hatch" sparingly, to |
| 69 // avoid the embedder interface ballooning and becoming very specific to Chrome. | 75 // avoid the embedder interface ballooning and becoming very specific to Chrome. |
| 70 // (Often, the call out to the client can happen in a different part of the code | 76 // (Often, the call out to the client can happen in a different part of the code |
| 71 // that either already has a hook out to the embedder, or calls out to one of | 77 // that either already has a hook out to the embedder, or calls out to one of |
| 72 // the observer interfaces.) | 78 // the observer interfaces.) |
| 73 class ContentBrowserClient { | 79 class ContentBrowserClient { |
| 74 public: | 80 public: |
| 75 virtual ~ContentBrowserClient() {} | 81 virtual ~ContentBrowserClient() {} |
| 76 | 82 |
| 83 // Allows the embedder to return a customed BrowserMainParts implementation |
| 84 // for the browser staratup code. Can return NULL, in which case the default |
| 85 // is used. |
| 86 virtual BrowserMainParts* CreateBrowserMainParts( |
| 87 const MainFunctionParams& parameters) = 0; |
| 88 |
| 77 virtual TabContentsView* CreateTabContentsView(TabContents* tab_contents) = 0; | 89 virtual TabContentsView* CreateTabContentsView(TabContents* tab_contents) = 0; |
| 78 | 90 |
| 79 // Notifies that a new RenderHostView has been created. | 91 // Notifies that a new RenderHostView has been created. |
| 80 virtual void RenderViewHostCreated(RenderViewHost* render_view_host) = 0; | 92 virtual void RenderViewHostCreated(RenderViewHost* render_view_host) = 0; |
| 81 | 93 |
| 82 // Notifies that a BrowserRenderProcessHost has been created. This is called | 94 // Notifies that a BrowserRenderProcessHost has been created. This is called |
| 83 // before the content layer adds its own BrowserMessageFilters, so that the | 95 // before the content layer adds its own BrowserMessageFilters, so that the |
| 84 // embedder's IPC filters have priority. | 96 // embedder's IPC filters have priority. |
| 85 virtual void BrowserRenderProcessHostCreated( | 97 virtual void BrowserRenderProcessHostCreated( |
| 86 BrowserRenderProcessHost* host) = 0; | 98 BrowserRenderProcessHost* host) = 0; |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // This is called on a worker thread. | 318 // This is called on a worker thread. |
| 307 virtual | 319 virtual |
| 308 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 320 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 309 const GURL& url) = 0; | 321 const GURL& url) = 0; |
| 310 #endif | 322 #endif |
| 311 }; | 323 }; |
| 312 | 324 |
| 313 } // namespace content | 325 } // namespace content |
| 314 | 326 |
| 315 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 327 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |