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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert ptr to bool for win compile. Created 8 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 | Annotate | Revision Log
OLDNEW
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 #include "chrome/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/string_split.h" 13 #include "base/string_split.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/common/child_process_logging.h" 16 #include "chrome/common/child_process_logging.h"
17 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/chrome_version_info.h" 19 #include "chrome/common/chrome_version_info.h"
20 #include "chrome/common/pepper_flash.h" 20 #include "chrome/common/pepper_flash.h"
21 #include "chrome/common/render_messages.h" 21 #include "chrome/common/render_messages.h"
22 #include "chrome/common/url_constants.h" 22 #include "chrome/common/url_constants.h"
23 #include "content/public/common/pepper_plugin_info.h" 23 #include "content/public/common/pepper_plugin_info.h"
24 #include "content/public/common/url_constants.h" 24 #include "content/public/common/url_constants.h"
25 #include "grit/common_resources.h" 25 #include "grit/common_resources.h"
26 #include "remoting/client/plugin/pepper_entrypoints.h" 26 #include "remoting/client/plugin/pepper_entrypoints.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/resource/resource_bundle.h" 28 #include "ui/base/resource/resource_bundle.h"
29 #include "ui/base/resource/resource_handle.h"
29 #include "webkit/glue/user_agent.h" 30 #include "webkit/glue/user_agent.h"
30 #include "webkit/plugins/npapi/plugin_list.h" 31 #include "webkit/plugins/npapi/plugin_list.h"
31 #include "webkit/plugins/plugin_constants.h" 32 #include "webkit/plugins/plugin_constants.h"
32 33
33 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR. 34 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
34 35
35 #if defined(OS_WIN) 36 #if defined(OS_WIN)
36 #include "base/win/registry.h" 37 #include "base/win/registry.h"
37 #include "base/win/windows_version.h" 38 #include "base/win/windows_version.h"
38 #include "sandbox/src/sandbox.h" 39 #include "sandbox/src/sandbox.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 std::string product("Chrome/"); 410 std::string product("Chrome/");
410 product += version_info.is_valid() ? version_info.Version() : "0.0.0.0"; 411 product += version_info.is_valid() ? version_info.Version() : "0.0.0.0";
411 return webkit_glue::BuildUserAgentFromProduct(product); 412 return webkit_glue::BuildUserAgentFromProduct(product);
412 } 413 }
413 414
414 string16 ChromeContentClient::GetLocalizedString(int message_id) const { 415 string16 ChromeContentClient::GetLocalizedString(int message_id) const {
415 return l10n_util::GetStringUTF16(message_id); 416 return l10n_util::GetStringUTF16(message_id);
416 } 417 }
417 418
418 base::StringPiece ChromeContentClient::GetDataResource(int resource_id) const { 419 base::StringPiece ChromeContentClient::GetDataResource(int resource_id) const {
419 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); 420 return ResourceBundle::GetSharedInstance().GetRawDataResource(
421 resource_id, ui::ResourceHandle::kScaleFactorNone);
420 } 422 }
421 423
422 #if defined(OS_WIN) 424 #if defined(OS_WIN)
423 bool ChromeContentClient::SandboxPlugin(CommandLine* command_line, 425 bool ChromeContentClient::SandboxPlugin(CommandLine* command_line,
424 sandbox::TargetPolicy* policy) { 426 sandbox::TargetPolicy* policy) {
425 std::wstring plugin_dll = command_line-> 427 std::wstring plugin_dll = command_line->
426 GetSwitchValueNative(switches::kPluginPath); 428 GetSwitchValueNative(switches::kPluginPath);
427 429
428 FilePath builtin_flash; 430 FilePath builtin_flash;
429 if (!PathService::Get(chrome::FILE_FLASH_PLUGIN, &builtin_flash)) 431 if (!PathService::Get(chrome::FILE_FLASH_PLUGIN, &builtin_flash))
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 500
499 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( 501 bool ChromeContentClient::GetBundledFieldTrialPepperFlash(
500 content::PepperPluginInfo* plugin, 502 content::PepperPluginInfo* plugin,
501 bool* override_npapi_flash) { 503 bool* override_npapi_flash) {
502 if (!ConductingPepperFlashFieldTrial()) 504 if (!ConductingPepperFlashFieldTrial())
503 return false; 505 return false;
504 return GetBundledPepperFlash(plugin, override_npapi_flash); 506 return GetBundledPepperFlash(plugin, override_npapi_flash);
505 } 507 }
506 508
507 } // namespace chrome 509 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698