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 ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
6 #define ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include "content/public/browser/content_browser_client.h" | 8 #include "content/public/browser/content_browser_client.h" |
9 | 9 |
10 #include "android_webview/browser/aw_browser_context.h" | 10 #include "android_webview/browser/aw_browser_context.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 | 12 |
13 namespace android_webview { | 13 namespace android_webview { |
14 | 14 |
15 class AwContentBrowserClient : public content::ContentBrowserClient { | 15 class AwContentBrowserClient : public content::ContentBrowserClient { |
16 public: | 16 public: |
17 AwContentBrowserClient(); | 17 AwContentBrowserClient(); |
18 virtual ~AwContentBrowserClient(); | 18 virtual ~AwContentBrowserClient(); |
19 | 19 |
20 AwBrowserContext* GetAwBrowserContext(); | 20 AwBrowserContext* GetAwBrowserContext(); |
21 | 21 |
22 // Overriden methods from ContentBrowserClient. | 22 // Overriden methods from ContentBrowserClient. |
23 virtual content::BrowserMainParts* CreateBrowserMainParts( | 23 virtual content::BrowserMainParts* CreateBrowserMainParts( |
24 const content::MainFunctionParams& parameters) OVERRIDE; | 24 const content::MainFunctionParams& parameters) OVERRIDE; |
| 25 virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( |
| 26 content::WebContents* web_contents) OVERRIDE; |
25 virtual void RenderProcessHostCreated( | 27 virtual void RenderProcessHostCreated( |
26 content::RenderProcessHost* host) OVERRIDE; | 28 content::RenderProcessHost* host) OVERRIDE; |
27 virtual std::string GetCanonicalEncodingNameByAliasName( | 29 virtual std::string GetCanonicalEncodingNameByAliasName( |
28 const std::string& alias_name) OVERRIDE; | 30 const std::string& alias_name) OVERRIDE; |
29 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, | 31 virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, |
30 int child_process_id) OVERRIDE; | 32 int child_process_id) OVERRIDE; |
31 virtual std::string GetApplicationLocale() OVERRIDE; | 33 virtual std::string GetApplicationLocale() OVERRIDE; |
32 virtual std::string GetAcceptLangs(content::BrowserContext* context) OVERRIDE; | 34 virtual std::string GetAcceptLangs(content::BrowserContext* context) OVERRIDE; |
33 virtual gfx::ImageSkia* GetDefaultFavicon() OVERRIDE; | 35 virtual gfx::ImageSkia* GetDefaultFavicon() OVERRIDE; |
34 virtual bool AllowAppCache(const GURL& manifest_url, | 36 virtual bool AllowAppCache(const GURL& manifest_url, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Android WebView currently has a single global (non-off-the-record) browser | 125 // Android WebView currently has a single global (non-off-the-record) browser |
124 // context. | 126 // context. |
125 scoped_ptr<AwBrowserContext> browser_context_; | 127 scoped_ptr<AwBrowserContext> browser_context_; |
126 | 128 |
127 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); | 129 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); |
128 }; | 130 }; |
129 | 131 |
130 } // namespace android_webview | 132 } // namespace android_webview |
131 | 133 |
132 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 134 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |