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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Embedder API (or SPI) for participating in browser logic, to be implemented | 74 // Embedder API (or SPI) for participating in browser logic, to be implemented |
75 // by the client of the content browser. See ChromeContentBrowserClient for the | 75 // by the client of the content browser. See ChromeContentBrowserClient for the |
76 // principal implementation. The methods are assumed to be called on the UI | 76 // principal implementation. The methods are assumed to be called on the UI |
77 // thread unless otherwise specified. Use this "escape hatch" sparingly, to | 77 // thread unless otherwise specified. Use this "escape hatch" sparingly, to |
78 // avoid the embedder interface ballooning and becoming very specific to Chrome. | 78 // avoid the embedder interface ballooning and becoming very specific to Chrome. |
79 // (Often, the call out to the client can happen in a different part of the code | 79 // (Often, the call out to the client can happen in a different part of the code |
80 // that either already has a hook out to the embedder, or calls out to one of | 80 // that either already has a hook out to the embedder, or calls out to one of |
81 // the observer interfaces.) | 81 // the observer interfaces.) |
82 class CONTENT_EXPORT ContentBrowserClient { | 82 class CONTENT_EXPORT ContentBrowserClient { |
83 public: | 83 public: |
| 84 virtual ~ContentBrowserClient() {} |
| 85 |
84 // Allows the embedder to set any number of custom BrowserMainParts | 86 // Allows the embedder to set any number of custom BrowserMainParts |
85 // implementations for the browser startup code. See comments in | 87 // implementations for the browser startup code. See comments in |
86 // browser_main_parts.h. | 88 // browser_main_parts.h. |
87 virtual BrowserMainParts* CreateBrowserMainParts( | 89 virtual BrowserMainParts* CreateBrowserMainParts( |
88 const MainFunctionParams& parameters); | 90 const MainFunctionParams& parameters); |
89 | 91 |
90 // Allows an embedder to return their own WebContentsView implementation. | 92 // Allows an embedder to return their own WebContentsView implementation. |
91 // Return NULL to let the default one for the platform be created. Otherwise | 93 // Return NULL to let the default one for the platform be created. Otherwise |
92 // |render_view_host_delegate_view| also needs to be provided, and it is | 94 // |render_view_host_delegate_view| also needs to be provided, and it is |
93 // owned by the embedder. | 95 // owned by the embedder. |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 virtual const wchar_t* GetResourceDllName(); | 417 virtual const wchar_t* GetResourceDllName(); |
416 #endif | 418 #endif |
417 | 419 |
418 #if defined(USE_NSS) | 420 #if defined(USE_NSS) |
419 // Return a delegate to authenticate and unlock |module|. | 421 // Return a delegate to authenticate and unlock |module|. |
420 // This is called on a worker thread. | 422 // This is called on a worker thread. |
421 virtual | 423 virtual |
422 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 424 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
423 const GURL& url); | 425 const GURL& url); |
424 #endif | 426 #endif |
425 | |
426 protected: | |
427 virtual ~ContentBrowserClient() {} | |
428 }; | 427 }; |
429 | 428 |
430 } // namespace content | 429 } // namespace content |
431 | 430 |
432 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 431 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |