diff options
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/layout_test_controller_bindings.cc | 4 | ||||
-rw-r--r-- | content/shell/shell_content_client.cc | 13 | ||||
-rw-r--r-- | content/shell/shell_content_client.h | 6 | ||||
-rw-r--r-- | content/shell/shell_devtools_delegate.cc | 4 |
4 files changed, 14 insertions, 13 deletions
diff --git a/content/shell/layout_test_controller_bindings.cc b/content/shell/layout_test_controller_bindings.cc index 054b4f7..2f3a5ad 100644 --- a/content/shell/layout_test_controller_bindings.cc +++ b/content/shell/layout_test_controller_bindings.cc @@ -10,7 +10,6 @@ #include "grit/shell_resources.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" -#include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" using WebKit::WebFrame; @@ -21,8 +20,7 @@ namespace content { namespace { base::StringPiece GetStringResource(int resource_id) { - return ResourceBundle::GetSharedInstance().GetRawDataResource( - resource_id, ui::SCALE_FACTOR_NONE); + return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); } RenderView* GetCurrentRenderView() { diff --git a/content/shell/shell_content_client.cc b/content/shell/shell_content_client.cc index c004593..e3c80d8 100644 --- a/content/shell/shell_content_client.cc +++ b/content/shell/shell_content_client.cc @@ -52,11 +52,16 @@ string16 ShellContentClient::GetLocalizedString(int message_id) const { return string16(); } -base::StringPiece ShellContentClient::GetDataResource( +base::StringPiece ShellContentClient::GetDataResource(int resource_id) const { + return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); +} + +base::StringPiece ShellContentClient::GetImageResource( int resource_id, - ui::ScaleFactor scale_factor) const { - return ResourceBundle::GetSharedInstance().GetRawDataResource( - resource_id, scale_factor); + float scale_factor) const { + // TODO(flackr): Pass scale_factor to ResourceBundle to get best matching + // image resource for the given scale factor. + return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); } #if defined(OS_WIN) diff --git a/content/shell/shell_content_client.h b/content/shell/shell_content_client.h index 1d3aeda..d8b216e 100644 --- a/content/shell/shell_content_client.h +++ b/content/shell/shell_content_client.h @@ -31,9 +31,9 @@ class ShellContentClient : public ContentClient { virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) OVERRIDE; virtual std::string GetUserAgent() const OVERRIDE; virtual string16 GetLocalizedString(int message_id) const OVERRIDE; - virtual base::StringPiece GetDataResource( - int resource_id, - ui::ScaleFactor scale_factor) const OVERRIDE; + virtual base::StringPiece GetDataResource(int resource_id) const OVERRIDE; + virtual base::StringPiece GetImageResource(int resource_id, + float scale_factor) const OVERRIDE; #if defined(OS_WIN) virtual bool SandboxPlugin(CommandLine* command_line, diff --git a/content/shell/shell_devtools_delegate.cc b/content/shell/shell_devtools_delegate.cc index cf35cd1..15cdce8 100644 --- a/content/shell/shell_devtools_delegate.cc +++ b/content/shell/shell_devtools_delegate.cc @@ -9,7 +9,6 @@ #include "content/public/browser/devtools_http_handler.h" #include "grit/shell_resources.h" #include "net/url_request/url_request_context_getter.h" -#include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" namespace content { @@ -36,8 +35,7 @@ void ShellDevToolsDelegate::Stop() { std::string ShellDevToolsDelegate::GetDiscoveryPageHTML() { return ResourceBundle::GetSharedInstance().GetRawDataResource( - IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE, - ui::SCALE_FACTOR_NONE).as_string(); + IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string(); } bool ShellDevToolsDelegate::BundlesFrontendResources() { |