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

Side by Side Diff: chrome/renderer/chrome_content_renderer_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: Merge with master. 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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/string_tokenizer.h" 13 #include "base/string_tokenizer.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/common/child_process_logging.h" 16 #include "chrome/common/child_process_logging.h"
17 #include "chrome/common/chrome_content_client.h" 17 #include "chrome/common/chrome_content_client.h"
18 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
19 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/content_settings_pattern.h" 20 #include "chrome/common/content_settings_pattern.h"
21 #include "chrome/common/external_ipc_fuzzer.h"
22 #include "chrome/common/extensions/extension.h" 21 #include "chrome/common/extensions/extension.h"
23 #include "chrome/common/extensions/extension_constants.h" 22 #include "chrome/common/extensions/extension_constants.h"
24 #include "chrome/common/extensions/extension_process_policy.h" 23 #include "chrome/common/extensions/extension_process_policy.h"
25 #include "chrome/common/extensions/extension_set.h" 24 #include "chrome/common/extensions/extension_set.h"
25 #include "chrome/common/external_ipc_fuzzer.h"
26 #include "chrome/common/jstemplate_builder.h" 26 #include "chrome/common/jstemplate_builder.h"
27 #include "chrome/common/render_messages.h" 27 #include "chrome/common/render_messages.h"
28 #include "chrome/common/url_constants.h" 28 #include "chrome/common/url_constants.h"
29 #include "chrome/renderer/autofill/autofill_agent.h" 29 #include "chrome/renderer/autofill/autofill_agent.h"
30 #include "chrome/renderer/autofill/password_autofill_manager.h" 30 #include "chrome/renderer/autofill/password_autofill_manager.h"
31 #include "chrome/renderer/autofill/password_generation_manager.h" 31 #include "chrome/renderer/autofill/password_generation_manager.h"
32 #include "chrome/renderer/automation/automation_renderer_helper.h" 32 #include "chrome/renderer/automation/automation_renderer_helper.h"
33 #include "chrome/renderer/benchmarking_extension.h" 33 #include "chrome/renderer/benchmarking_extension.h"
34 #include "chrome/renderer/chrome_render_process_observer.h" 34 #include "chrome/renderer/chrome_render_process_observer.h"
35 #include "chrome/renderer/chrome_render_view_observer.h" 35 #include "chrome/renderer/chrome_render_view_observer.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" 81 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
82 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 82 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
83 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h" 83 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h"
84 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" 84 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
85 #include "ui/base/l10n/l10n_util.h" 85 #include "ui/base/l10n/l10n_util.h"
86 #include "ui/base/layout.h"
86 #include "ui/base/resource/resource_bundle.h" 87 #include "ui/base/resource/resource_bundle.h"
87 #include "webkit/plugins/npapi/plugin_list.h" 88 #include "webkit/plugins/npapi/plugin_list.h"
88 #include "webkit/plugins/ppapi/plugin_module.h" 89 #include "webkit/plugins/ppapi/plugin_module.h"
89 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" 90 #include "webkit/plugins/ppapi/ppapi_interface_factory.h"
90 91
91 using WebKit::WebCache; 92 using WebKit::WebCache;
92 using WebKit::WebConsoleMessage; 93 using WebKit::WebConsoleMessage;
93 using WebKit::WebDataSource; 94 using WebKit::WebDataSource;
94 using WebKit::WebDocument; 95 using WebKit::WebDocument;
95 using WebKit::WebFrame; 96 using WebKit::WebFrame;
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 } else { 653 } else {
653 if (is_repost) { 654 if (is_repost) {
654 LocalizedError::GetFormRepostStrings(failed_url, &error_strings); 655 LocalizedError::GetFormRepostStrings(failed_url, &error_strings);
655 } else { 656 } else {
656 LocalizedError::GetStrings(error, &error_strings); 657 LocalizedError::GetStrings(error, &error_strings);
657 } 658 }
658 resource_id = IDR_NET_ERROR_HTML; 659 resource_id = IDR_NET_ERROR_HTML;
659 } 660 }
660 661
661 const base::StringPiece template_html( 662 const base::StringPiece template_html(
662 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); 663 ResourceBundle::GetSharedInstance().GetRawDataResource(
664 resource_id, ui::SCALE_FACTOR_NONE));
663 if (template_html.empty()) { 665 if (template_html.empty()) {
664 NOTREACHED() << "unable to load template. ID: " << resource_id; 666 NOTREACHED() << "unable to load template. ID: " << resource_id;
665 } else { 667 } else {
666 // "t" is the id of the templates root node. 668 // "t" is the id of the templates root node.
667 *error_html = jstemplate_builder::GetTemplatesHtml( 669 *error_html = jstemplate_builder::GetTemplatesHtml(
668 template_html, &error_strings, "t"); 670 template_html, &error_strings, "t");
669 } 671 }
670 } 672 }
671 673
672 if (error_description) { 674 if (error_description) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 902 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
901 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 903 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
902 } 904 }
903 905
904 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 906 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
905 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 907 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
906 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 908 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
907 } 909 }
908 910
909 } // namespace chrome 911 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698