| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 14 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
| 15 #include "content/public/common/media_stream_request.h" | 15 #include "content/public/common/media_stream_request.h" |
| 16 #include "content/public/common/window_container_type.h" | 16 #include "content/public/common/window_container_type.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen
ter.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen
ter.h" |
| 18 | 18 |
| 19 class BrowserURLHandler; | 19 class BrowserURLHandler; |
| 20 class CommandLine; | 20 class CommandLine; |
| 21 class FilePath; | 21 class FilePath; |
| 22 class GURL; | 22 class GURL; |
| 23 class PluginProcessHost; | 23 class PluginProcessHost; |
| 24 class RenderViewHost; | |
| 25 class ResourceDispatcherHost; | 24 class ResourceDispatcherHost; |
| 26 class SkBitmap; | 25 class SkBitmap; |
| 27 struct WebPreferences; | 26 struct WebPreferences; |
| 28 | 27 |
| 28 namespace content { |
| 29 class RenderViewHost; |
| 30 } |
| 31 |
| 29 namespace crypto { | 32 namespace crypto { |
| 30 class CryptoModuleBlockingPasswordDelegate; | 33 class CryptoModuleBlockingPasswordDelegate; |
| 31 } | 34 } |
| 32 | 35 |
| 33 namespace net { | 36 namespace net { |
| 34 class CookieList; | 37 class CookieList; |
| 35 class CookieOptions; | 38 class CookieOptions; |
| 36 class HttpNetworkSession; | 39 class HttpNetworkSession; |
| 37 class NetLog; | 40 class NetLog; |
| 38 class SSLCertRequestInfo; | 41 class SSLCertRequestInfo; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 82 |
| 80 // Allows the embedder to set any number of custom BrowserMainParts | 83 // Allows the embedder to set any number of custom BrowserMainParts |
| 81 // implementations for the browser startup code. See comments in | 84 // implementations for the browser startup code. See comments in |
| 82 // browser_main_parts.h. | 85 // browser_main_parts.h. |
| 83 virtual BrowserMainParts* CreateBrowserMainParts( | 86 virtual BrowserMainParts* CreateBrowserMainParts( |
| 84 const content::MainFunctionParams& parameters) = 0; | 87 const content::MainFunctionParams& parameters) = 0; |
| 85 | 88 |
| 86 virtual WebContentsView* CreateWebContentsView(WebContents* web_contents) = 0; | 89 virtual WebContentsView* CreateWebContentsView(WebContents* web_contents) = 0; |
| 87 | 90 |
| 88 // Notifies that a new RenderHostView has been created. | 91 // Notifies that a new RenderHostView has been created. |
| 89 virtual void RenderViewHostCreated(RenderViewHost* render_view_host) = 0; | 92 virtual void RenderViewHostCreated( |
| 93 content::RenderViewHost* render_view_host) = 0; |
| 90 | 94 |
| 91 // Notifies that a RenderProcessHost has been created. This is called before | 95 // Notifies that a RenderProcessHost has been created. This is called before |
| 92 // the content layer adds its own BrowserMessageFilters, so that the | 96 // the content layer adds its own BrowserMessageFilters, so that the |
| 93 // embedder's IPC filters have priority. | 97 // embedder's IPC filters have priority. |
| 94 virtual void RenderProcessHostCreated( | 98 virtual void RenderProcessHostCreated( |
| 95 content::RenderProcessHost* host) = 0; | 99 content::RenderProcessHost* host) = 0; |
| 96 | 100 |
| 97 // Gets the WebUIControllerFactory which will be responsible for generating | 101 // Gets the WebUIControllerFactory which will be responsible for generating |
| 98 // WebUIs. Can return NULL if the embedder doesn't need WebUI support. | 102 // WebUIs. Can return NULL if the embedder doesn't need WebUI support. |
| 99 virtual WebUIControllerFactory* GetWebUIControllerFactory() = 0; | 103 virtual WebUIControllerFactory* GetWebUIControllerFactory() = 0; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 336 |
| 333 // Creates a new AccessTokenStore for gelocation. | 337 // Creates a new AccessTokenStore for gelocation. |
| 334 virtual AccessTokenStore* CreateAccessTokenStore() = 0; | 338 virtual AccessTokenStore* CreateAccessTokenStore() = 0; |
| 335 | 339 |
| 336 // Returns true if fast shutdown is possible. | 340 // Returns true if fast shutdown is possible. |
| 337 virtual bool IsFastShutdownPossible() = 0; | 341 virtual bool IsFastShutdownPossible() = 0; |
| 338 | 342 |
| 339 // Called by WebContents to override the WebKit preferences that are used by | 343 // Called by WebContents to override the WebKit preferences that are used by |
| 340 // the renderer. The content layer will add its own settings, and then it's up | 344 // the renderer. The content layer will add its own settings, and then it's up |
| 341 // to the embedder to update it if it wants. | 345 // to the embedder to update it if it wants. |
| 342 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, | 346 virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host, |
| 343 const GURL& url, | 347 const GURL& url, |
| 344 WebPreferences* prefs) = 0; | 348 WebPreferences* prefs) = 0; |
| 345 | 349 |
| 346 // Inspector setting was changed and should be persisted. | 350 // Inspector setting was changed and should be persisted. |
| 347 virtual void UpdateInspectorSetting(RenderViewHost* rvh, | 351 virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, |
| 348 const std::string& key, | 352 const std::string& key, |
| 349 const std::string& value) = 0; | 353 const std::string& value) = 0; |
| 350 | 354 |
| 351 // Clear the Inspector settings. | 355 // Clear the Inspector settings. |
| 352 virtual void ClearInspectorSettings(RenderViewHost* rvh) = 0; | 356 virtual void ClearInspectorSettings(content::RenderViewHost* rvh) = 0; |
| 353 | 357 |
| 354 // Notifies that BrowserURLHandler has been created, so that the embedder can | 358 // Notifies that BrowserURLHandler has been created, so that the embedder can |
| 355 // optionally add their own handlers. | 359 // optionally add their own handlers. |
| 356 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) = 0; | 360 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) = 0; |
| 357 | 361 |
| 358 // Clears browser cache. | 362 // Clears browser cache. |
| 359 virtual void ClearCache(RenderViewHost* rvh) = 0; | 363 virtual void ClearCache(content::RenderViewHost* rvh) = 0; |
| 360 | 364 |
| 361 // Clears browser cookies. | 365 // Clears browser cookies. |
| 362 virtual void ClearCookies(RenderViewHost* rvh) = 0; | 366 virtual void ClearCookies(content::RenderViewHost* rvh) = 0; |
| 363 | 367 |
| 364 // Returns the default download directory. | 368 // Returns the default download directory. |
| 365 // This can be called on any thread. | 369 // This can be called on any thread. |
| 366 virtual FilePath GetDefaultDownloadDirectory() = 0; | 370 virtual FilePath GetDefaultDownloadDirectory() = 0; |
| 367 | 371 |
| 368 // Returns the default filename used in downloads when we have no idea what | 372 // Returns the default filename used in downloads when we have no idea what |
| 369 // else we should do with the file. | 373 // else we should do with the file. |
| 370 virtual std::string GetDefaultDownloadName() = 0; | 374 virtual std::string GetDefaultDownloadName() = 0; |
| 371 | 375 |
| 372 // Returns true if given origin can use TCP/UDP sockets. | 376 // Returns true if given origin can use TCP/UDP sockets. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 389 // This is called on a worker thread. | 393 // This is called on a worker thread. |
| 390 virtual | 394 virtual |
| 391 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 395 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 392 const GURL& url) = 0; | 396 const GURL& url) = 0; |
| 393 #endif | 397 #endif |
| 394 }; | 398 }; |
| 395 | 399 |
| 396 } // namespace content | 400 } // namespace content |
| 397 | 401 |
| 398 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 402 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |