Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: blimp/engine/common/blimp_content_client.cc

Issue 1922613003: Add blimp to root GN check_targets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Flipped the order of the conditional in //content/app/BUILD.gn Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 #include "blimp/engine/common/blimp_content_client.h" 5 #include "blimp/engine/common/blimp_content_client.h"
6 6
7 #include "components/version_info/version_info.h"
8 #include "content/public/common/user_agent.h"
9 #include "ui/base/l10n/l10n_util.h" 7 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
11 9
12 namespace blimp { 10 namespace blimp {
13 namespace engine { 11 namespace engine {
14 12
15 std::string client_os_info = "Linux; Android 5.1.1";
16
17 std::string GetBlimpEngineUserAgent() {
18 return content::BuildUserAgentFromOSAndProduct(
19 client_os_info,
20 version_info::GetProductNameAndVersionForUserAgent() + " Mobile");
21 }
22
23 void SetClientOSInfo(std::string os_version_info) {
24 client_os_info = os_version_info;
25 }
26
27 BlimpContentClient::~BlimpContentClient() {} 13 BlimpContentClient::~BlimpContentClient() {}
28 14
29 std::string BlimpContentClient::GetUserAgent() const { 15 std::string BlimpContentClient::GetUserAgent() const {
30 return GetBlimpEngineUserAgent(); 16 return GetBlimpEngineUserAgent();
31 } 17 }
32 18
33 base::string16 BlimpContentClient::GetLocalizedString(int message_id) const { 19 base::string16 BlimpContentClient::GetLocalizedString(int message_id) const {
34 return l10n_util::GetStringUTF16(message_id); 20 return l10n_util::GetStringUTF16(message_id);
35 } 21 }
36 22
(...skipping 10 matching lines...) Expand all
47 resource_id); 33 resource_id);
48 } 34 }
49 35
50 gfx::Image& BlimpContentClient::GetNativeImageNamed(int resource_id) const { 36 gfx::Image& BlimpContentClient::GetNativeImageNamed(int resource_id) const {
51 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( 37 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
52 resource_id); 38 resource_id);
53 } 39 }
54 40
55 } // namespace engine 41 } // namespace engine
56 } // namespace blimp 42 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/app/blimp_url_request_context_getter.cc ('k') | blimp/engine/common/blimp_user_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698