Chromium Code Reviews| 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..d5e691833d954501fd51c1bb61c95a28a7354e4b 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"); |
|
flackr
2011/11/30 16:00:46
Add a space before "true".
Rick Byers
2011/11/30 16:23:07
Done.
|
| +} |
| + |
| // static |
| bool ChromeWebUI::IsMoreWebUI() { |
| bool more_webui = CommandLine::ForCurrentProcess()->HasSwitch( |