Index: chrome/browser/ui/webui/chrome_web_ui.cc |
diff --git a/chrome/browser/ui/webui/chrome_web_ui.cc b/chrome/browser/ui/webui/chrome_web_ui.cc |
index ea37886c665337f5ce1602400932a6d8d70e6a9e..466309889b088bce8eeb93844b6d6913acdda2be 100644 |
--- a/chrome/browser/ui/webui/chrome_web_ui.cc |
+++ b/chrome/browser/ui/webui/chrome_web_ui.cc |
@@ -7,6 +7,7 @@ |
#include "base/command_line.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/chrome_switches.h" |
+#include "content/browser/renderer_host/render_view_host.h" |
#include "content/browser/tab_contents/tab_contents.h" |
#if defined(TOOLKIT_VIEWS) |
@@ -35,6 +36,17 @@ bool ChromeWebUI::CanShowBookmarkBar() const { |
return false; |
} |
+void ChromeWebUI::RenderViewCreated(RenderViewHost* render_view_host) { |
+ WebUI::RenderViewCreated(render_view_host); |
+ |
+ // Let the WebUI know that we're looking for UI that's optimized for touch |
+ // input. |
+ // TODO(rbyers) Figure out the right model for enabling touch-optimized UI |
+ // (http://crbug.com/105380). |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTouchOptimizedUI)) |
+ render_view_host->SetWebUIProperty("touchOptimized", "true"); |
+} |
+ |
// static |
bool ChromeWebUI::IsMoreWebUI() { |
bool more_webui = CommandLine::ForCurrentProcess()->HasSwitch( |