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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 } | 46 } |
47 | 47 |
48 namespace blink { | 48 namespace blink { |
49 struct WebWindowFeatures; | 49 struct WebWindowFeatures; |
50 } | 50 } |
51 | 51 |
52 namespace gfx { | 52 namespace gfx { |
53 class ImageSkia; | 53 class ImageSkia; |
54 } | 54 } |
55 | 55 |
56 namespace mojo { | |
57 class ApplicationDelegate; | |
58 } | |
59 | |
56 namespace net { | 60 namespace net { |
57 class CookieOptions; | 61 class CookieOptions; |
58 class NetLog; | 62 class NetLog; |
59 class SSLCertRequestInfo; | 63 class SSLCertRequestInfo; |
60 class SSLInfo; | 64 class SSLInfo; |
61 class URLRequest; | 65 class URLRequest; |
62 class URLRequestContext; | 66 class URLRequestContext; |
63 class URLRequestContextGetter; | 67 class URLRequestContextGetter; |
64 class X509Certificate; | 68 class X509Certificate; |
65 } | 69 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 // Embedder API (or SPI) for participating in browser logic, to be implemented | 129 // Embedder API (or SPI) for participating in browser logic, to be implemented |
126 // by the client of the content browser. See ChromeContentBrowserClient for the | 130 // by the client of the content browser. See ChromeContentBrowserClient for the |
127 // principal implementation. The methods are assumed to be called on the UI | 131 // principal implementation. The methods are assumed to be called on the UI |
128 // thread unless otherwise specified. Use this "escape hatch" sparingly, to | 132 // thread unless otherwise specified. Use this "escape hatch" sparingly, to |
129 // avoid the embedder interface ballooning and becoming very specific to Chrome. | 133 // avoid the embedder interface ballooning and becoming very specific to Chrome. |
130 // (Often, the call out to the client can happen in a different part of the code | 134 // (Often, the call out to the client can happen in a different part of the code |
131 // that either already has a hook out to the embedder, or calls out to one of | 135 // that either already has a hook out to the embedder, or calls out to one of |
132 // the observer interfaces.) | 136 // the observer interfaces.) |
133 class CONTENT_EXPORT ContentBrowserClient { | 137 class CONTENT_EXPORT ContentBrowserClient { |
134 public: | 138 public: |
139 using StaticMojoApplicationMap = | |
140 std::map<GURL, base::Callback<scoped_ptr<mojo::ApplicationDelegate>()>>; | |
jam
2015/06/03 14:50:20
nit: by convention we put these typedefs right bef
| |
141 | |
135 virtual ~ContentBrowserClient() {} | 142 virtual ~ContentBrowserClient() {} |
136 | 143 |
137 // Allows the embedder to set any number of custom BrowserMainParts | 144 // Allows the embedder to set any number of custom BrowserMainParts |
138 // implementations for the browser startup code. See comments in | 145 // implementations for the browser startup code. See comments in |
139 // browser_main_parts.h. | 146 // browser_main_parts.h. |
140 virtual BrowserMainParts* CreateBrowserMainParts( | 147 virtual BrowserMainParts* CreateBrowserMainParts( |
141 const MainFunctionParams& parameters); | 148 const MainFunctionParams& parameters); |
142 | 149 |
143 // Allows the embedder to change the default behavior of | 150 // Allows the embedder to change the default behavior of |
144 // BrowserThread::PostAfterStartupTask to better match whatever | 151 // BrowserThread::PostAfterStartupTask to better match whatever |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
571 // Allows to override browser Mojo services exposed through the | 578 // Allows to override browser Mojo services exposed through the |
572 // RenderProcessHost. | 579 // RenderProcessHost. |
573 virtual void OverrideRenderProcessMojoServices(ServiceRegistry* registry) {} | 580 virtual void OverrideRenderProcessMojoServices(ServiceRegistry* registry) {} |
574 | 581 |
575 // Allows to override browser Mojo services exposed through the | 582 // Allows to override browser Mojo services exposed through the |
576 // RenderFrameHost. | 583 // RenderFrameHost. |
577 virtual void OverrideRenderFrameMojoServices( | 584 virtual void OverrideRenderFrameMojoServices( |
578 ServiceRegistry* registry, | 585 ServiceRegistry* registry, |
579 RenderFrameHost* render_frame_host) {} | 586 RenderFrameHost* render_frame_host) {} |
580 | 587 |
588 // Registers in-process Mojo application loaders with the browser's global | |
589 // Mojo shell. | |
590 virtual void RegisterMojoApplications(StaticMojoApplicationMap* apps) {} | |
591 | |
581 // Registers additional navigator.connect service factories available in a | 592 // Registers additional navigator.connect service factories available in a |
582 // particular NavigatorConnectContext. | 593 // particular NavigatorConnectContext. |
583 virtual void GetAdditionalNavigatorConnectServices( | 594 virtual void GetAdditionalNavigatorConnectServices( |
584 const scoped_refptr<NavigatorConnectContext>& context) {} | 595 const scoped_refptr<NavigatorConnectContext>& context) {} |
585 | 596 |
586 // Allows to override the visibility state of a RenderFrameHost. | 597 // Allows to override the visibility state of a RenderFrameHost. |
587 // |visibility_state| should not be null. It will only be set if needed. | 598 // |visibility_state| should not be null. It will only be set if needed. |
588 virtual void OverridePageVisibilityState( | 599 virtual void OverridePageVisibilityState( |
589 RenderFrameHost* render_frame_host, | 600 RenderFrameHost* render_frame_host, |
590 blink::WebPageVisibilityState* visibility_state) {} | 601 blink::WebPageVisibilityState* visibility_state) {} |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
628 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 639 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
629 // implementation. Return nullptr to disable external surface video. | 640 // implementation. Return nullptr to disable external surface video. |
630 virtual ExternalVideoSurfaceContainer* | 641 virtual ExternalVideoSurfaceContainer* |
631 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 642 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
632 #endif | 643 #endif |
633 }; | 644 }; |
634 | 645 |
635 } // namespace content | 646 } // namespace content |
636 | 647 |
637 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 648 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |