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_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 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "content/public/browser/browser_main_parts.h" | |
12 #include "content/public/common/window_container_type.h" | 13 #include "content/public/common/window_container_type.h" |
13 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h" |
15 | 16 |
16 class AccessTokenStore; | 17 class AccessTokenStore; |
17 class BrowserRenderProcessHost; | 18 class BrowserRenderProcessHost; |
18 class BrowserURLHandler; | 19 class BrowserURLHandler; |
19 class CommandLine; | 20 class CommandLine; |
20 class DevToolsManager; | 21 class DevToolsManager; |
21 class FilePath; | 22 class FilePath; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 class SpeechInputManager; | 61 class SpeechInputManager; |
61 } | 62 } |
62 | 63 |
63 namespace ui { | 64 namespace ui { |
64 class Clipboard; | 65 class Clipboard; |
65 } | 66 } |
66 | 67 |
67 namespace content { | 68 namespace content { |
68 | 69 |
69 class BrowserContext; | 70 class BrowserContext; |
70 class BrowserMainParts; | |
71 class ResourceContext; | 71 class ResourceContext; |
72 class WebUIFactory; | 72 class WebUIFactory; |
73 | 73 |
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 ContentBrowserClient { | 82 class ContentBrowserClient { |
83 public: | 83 public: |
84 virtual ~ContentBrowserClient() {} | 84 virtual ~ContentBrowserClient() {} |
85 | 85 |
86 typedef std::vector<BrowserMainParts*> BrowserMainPartsList; | |
jam
2011/10/24 19:36:00
nit: i think a typedef isn't necessary in the inte
stevenjb
2011/10/25 02:51:04
Done.
| |
87 | |
86 // Allows the embedder to return a customed BrowserMainParts implementation | 88 // Allows the embedder to return a customed BrowserMainParts implementation |
87 // for the browser staratup code. Can return NULL, in which case the default | 89 // for the browser staratup code. Can return NULL, in which case the default |
jam
2011/10/24 19:36:00
nit: update the comment for the return value
stevenjb
2011/10/25 02:51:04
Done.
| |
88 // is used. | 90 // is used. |
89 virtual BrowserMainParts* CreateBrowserMainParts( | 91 virtual void CreateBrowserMainParts(const MainFunctionParams& parameters, |
90 const MainFunctionParams& parameters) = 0; | 92 BrowserMainPartsList& parts_list) = 0; |
91 | 93 |
92 // Platform-specific creator. Use this to construct new RenderWidgetHostViews | 94 // Platform-specific creator. Use this to construct new RenderWidgetHostViews |
93 // rather than using RenderWidgetHostViewWin & friends. | 95 // rather than using RenderWidgetHostViewWin & friends. |
94 // | 96 // |
95 // This function must NOT size it, because the RenderView in the renderer | 97 // This function must NOT size it, because the RenderView in the renderer |
96 // wouldn't have been created yet. The widget would set its "waiting for | 98 // wouldn't have been created yet. The widget would set its "waiting for |
97 // resize ack" flag, and the ack would never come becasue no RenderView | 99 // resize ack" flag, and the ack would never come becasue no RenderView |
98 // received it. | 100 // received it. |
99 // | 101 // |
100 // The RenderWidgetHost must already be created (because we can't know if it's | 102 // The RenderWidgetHost must already be created (because we can't know if it's |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
342 // This is called on a worker thread. | 344 // This is called on a worker thread. |
343 virtual | 345 virtual |
344 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 346 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
345 const GURL& url) = 0; | 347 const GURL& url) = 0; |
346 #endif | 348 #endif |
347 }; | 349 }; |
348 | 350 |
349 } // namespace content | 351 } // namespace content |
350 | 352 |
351 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 353 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |