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_COMMON_AW_CONTENT_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_COMMON_AW_CONTENT_CLIENT_H_ |
6 #define ANDROID_WEBVIEW_COMMON_AW_CONTENT_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_COMMON_AW_CONTENT_CLIENT_H_ |
7 | 7 |
8 #include "content/public/common/content_client.h" | 8 #include "content/public/common/content_client.h" |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 | 11 |
12 namespace gpu { | 12 namespace gpu { |
13 struct GPUInfo; | 13 struct GPUInfo; |
14 } | 14 } |
15 | 15 |
16 namespace android_webview { | 16 namespace android_webview { |
17 | 17 |
18 std::string GetProduct(); | 18 std::string GetProduct(); |
19 std::string GetUserAgent(); | 19 std::string GetUserAgent(); |
20 // extra text to be put into the OS section of the user agent text | 20 // extra text to be put into the OS section of the user agent text |
21 std::string GetExtraOSUserAgentInfo(); | 21 std::string GetExtraOSUserAgentInfo(); |
22 | 22 |
23 class AwContentClient : public content::ContentClient { | 23 class AwContentClient : public content::ContentClient { |
24 public: | 24 public: |
25 // ContentClient implementation. | 25 // ContentClient implementation. |
26 std::string GetProduct() const override; | 26 std::string GetProduct() const override; |
27 std::string GetUserAgent() const override; | 27 std::string GetUserAgent() const override; |
28 base::string16 GetLocalizedString(int message_id) const override; | 28 base::string16 GetLocalizedString(int message_id) const override; |
| 29 base::string16 GetLocalizedStringF( |
| 30 int message_id, |
| 31 const base::string16& string0) const override; |
29 base::StringPiece GetDataResource( | 32 base::StringPiece GetDataResource( |
30 int resource_id, | 33 int resource_id, |
31 ui::ScaleFactor scale_factor) const override; | 34 ui::ScaleFactor scale_factor) const override; |
32 bool CanSendWhileSwappedOut(const IPC::Message* message) override; | 35 bool CanSendWhileSwappedOut(const IPC::Message* message) override; |
33 | 36 |
34 void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; | 37 void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; |
35 const std::string& gpu_fingerprint() const { return gpu_fingerprint_; } | 38 const std::string& gpu_fingerprint() const { return gpu_fingerprint_; } |
36 | 39 |
37 private: | 40 private: |
38 std::string gpu_fingerprint_; | 41 std::string gpu_fingerprint_; |
39 }; | 42 }; |
40 | 43 |
41 } // namespace android_webview | 44 } // namespace android_webview |
42 | 45 |
43 #endif // ANDROID_WEBVIEW_COMMON_AW_CONTENT_CLIENT_H_ | 46 #endif // ANDROID_WEBVIEW_COMMON_AW_CONTENT_CLIENT_H_ |
OLD | NEW |