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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 10412004: Revert "Revert 137734 - 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
« no previous file with comments | « chrome/common/web_apps.cc ('k') | chrome/renderer/extensions/extension_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 autofill::AutofillAgent; 92 using autofill::AutofillAgent;
92 using autofill::PasswordAutofillManager; 93 using autofill::PasswordAutofillManager;
93 using autofill::PasswordGenerationManager; 94 using autofill::PasswordGenerationManager;
94 using content::RenderThread; 95 using content::RenderThread;
95 using extensions::Extension; 96 using extensions::Extension;
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 } else { 662 } else {
662 if (is_repost) { 663 if (is_repost) {
663 LocalizedError::GetFormRepostStrings(failed_url, &error_strings); 664 LocalizedError::GetFormRepostStrings(failed_url, &error_strings);
664 } else { 665 } else {
665 LocalizedError::GetStrings(error, &error_strings); 666 LocalizedError::GetStrings(error, &error_strings);
666 } 667 }
667 resource_id = IDR_NET_ERROR_HTML; 668 resource_id = IDR_NET_ERROR_HTML;
668 } 669 }
669 670
670 const base::StringPiece template_html( 671 const base::StringPiece template_html(
671 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); 672 ResourceBundle::GetSharedInstance().GetRawDataResource(
673 resource_id, ui::SCALE_FACTOR_NONE));
672 if (template_html.empty()) { 674 if (template_html.empty()) {
673 NOTREACHED() << "unable to load template. ID: " << resource_id; 675 NOTREACHED() << "unable to load template. ID: " << resource_id;
674 } else { 676 } else {
675 // "t" is the id of the templates root node. 677 // "t" is the id of the templates root node.
676 *error_html = jstemplate_builder::GetTemplatesHtml( 678 *error_html = jstemplate_builder::GetTemplatesHtml(
677 template_html, &error_strings, "t"); 679 template_html, &error_strings, "t");
678 } 680 }
679 } 681 }
680 682
681 if (error_description) { 683 if (error_description) {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 919 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
918 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 920 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
919 } 921 }
920 922
921 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 923 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
922 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 924 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
923 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 925 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
924 } 926 }
925 927
926 } // namespace chrome 928 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/web_apps.cc ('k') | chrome/renderer/extensions/extension_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698