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 |
11 #include "content/common/content_client.h" | 11 #include "content/common/content_client.h" |
12 | 12 |
13 class BrowserRenderProcessHost; | 13 class BrowserRenderProcessHost; |
14 class CommandLine; | 14 class CommandLine; |
15 class GURL; | 15 class GURL; |
16 class Profile; | 16 class Profile; |
17 class RenderViewHost; | 17 class RenderViewHost; |
18 class TabContents; | 18 class TabContents; |
19 class WorkerProcessHost; | 19 class WorkerProcessHost; |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
| 23 class ResourceContext; |
23 class WebUIFactory; | 24 class WebUIFactory; |
24 | 25 |
25 // Embedder API for participating in browser logic. | 26 // Embedder API for participating in browser logic. |
26 class ContentBrowserClient { | 27 class ContentBrowserClient { |
27 public: | 28 public: |
28 // Notifies that a new RenderHostView has been created. | 29 // Notifies that a new RenderHostView has been created. |
29 virtual void RenderViewHostCreated(RenderViewHost* render_view_host); | 30 virtual void RenderViewHostCreated(RenderViewHost* render_view_host); |
30 | 31 |
31 // Initialize a RenderViewHost before its CreateRenderView method is called. | 32 // Initialize a RenderViewHost before its CreateRenderView method is called. |
32 virtual void PreCreateRenderView(RenderViewHost* render_view_host, | 33 virtual void PreCreateRenderView(RenderViewHost* render_view_host, |
(...skipping 21 matching lines...) Expand all Loading... |
54 const std::string& alias_name); | 55 const std::string& alias_name); |
55 | 56 |
56 // Allows the embedder to pass extra command line flags. | 57 // Allows the embedder to pass extra command line flags. |
57 // switches::kProcessType will already be set at this point. | 58 // switches::kProcessType will already be set at this point. |
58 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, | 59 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, |
59 int child_process_id); | 60 int child_process_id); |
60 | 61 |
61 // Returns the locale used by the application. | 62 // Returns the locale used by the application. |
62 virtual std::string GetApplicationLocale(); | 63 virtual std::string GetApplicationLocale(); |
63 | 64 |
| 65 // Allow the embedder to control if an AppCache can be used for the given url. |
| 66 // This is called on the IO thread. |
| 67 virtual bool AllowAppCache(const GURL& manifest_url, |
| 68 const content::ResourceContext* context); |
| 69 |
64 #if defined(OS_LINUX) | 70 #if defined(OS_LINUX) |
65 // Can return an optional fd for crash handling, otherwise returns -1. | 71 // Can return an optional fd for crash handling, otherwise returns -1. |
66 virtual int GetCrashSignalFD(const std::string& process_type); | 72 virtual int GetCrashSignalFD(const std::string& process_type); |
67 #endif | 73 #endif |
68 }; | 74 }; |
69 | 75 |
70 } // namespace content | 76 } // namespace content |
71 | 77 |
72 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 78 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |