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

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: 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/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"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" 80 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
81 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 81 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
82 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h" 82 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h"
83 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" 83 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
84 #include "ui/base/l10n/l10n_util.h" 84 #include "ui/base/l10n/l10n_util.h"
85 #include "ui/base/resource/resource_bundle.h" 85 #include "ui/base/resource/resource_bundle.h"
86 #include "ui/base/resource/resource_handle.h"
86 #include "webkit/plugins/npapi/plugin_list.h" 87 #include "webkit/plugins/npapi/plugin_list.h"
87 #include "webkit/plugins/ppapi/plugin_module.h" 88 #include "webkit/plugins/ppapi/plugin_module.h"
88 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" 89 #include "webkit/plugins/ppapi/ppapi_interface_factory.h"
89 90
90 using WebKit::WebCache; 91 using WebKit::WebCache;
91 using WebKit::WebConsoleMessage; 92 using WebKit::WebConsoleMessage;
92 using WebKit::WebDataSource; 93 using WebKit::WebDataSource;
93 using WebKit::WebDocument; 94 using WebKit::WebDocument;
94 using WebKit::WebFrame; 95 using WebKit::WebFrame;
95 using WebKit::WebPlugin; 96 using WebKit::WebPlugin;
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } else { 646 } else {
646 if (is_repost) { 647 if (is_repost) {
647 LocalizedError::GetFormRepostStrings(failed_url, &error_strings); 648 LocalizedError::GetFormRepostStrings(failed_url, &error_strings);
648 } else { 649 } else {
649 LocalizedError::GetStrings(error, &error_strings); 650 LocalizedError::GetStrings(error, &error_strings);
650 } 651 }
651 resource_id = IDR_NET_ERROR_HTML; 652 resource_id = IDR_NET_ERROR_HTML;
652 } 653 }
653 654
654 const base::StringPiece template_html( 655 const base::StringPiece template_html(
655 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); 656 ResourceBundle::GetSharedInstance().GetRawDataResource(
657 resource_id, ui::ResourceHandle::kScaleFactorNone));
656 if (template_html.empty()) { 658 if (template_html.empty()) {
657 NOTREACHED() << "unable to load template. ID: " << resource_id; 659 NOTREACHED() << "unable to load template. ID: " << resource_id;
658 } else { 660 } else {
659 // "t" is the id of the templates root node. 661 // "t" is the id of the templates root node.
660 *error_html = jstemplate_builder::GetTemplatesHtml( 662 *error_html = jstemplate_builder::GetTemplatesHtml(
661 template_html, &error_strings, "t"); 663 template_html, &error_strings, "t");
662 } 664 }
663 } 665 }
664 666
665 if (error_description) { 667 if (error_description) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 895 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
894 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 896 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
895 } 897 }
896 898
897 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 899 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
898 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 900 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
899 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 901 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
900 } 902 }
901 903
902 } // namespace chrome 904 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698