Index: chrome/browser/browser_about_handler.cc |
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc |
index ea28611ceb35add8b3a975fe5ca21cc7623a06bc..d8158b3411d7846e34572c6176a87ce64cbd1863 100644 |
--- a/chrome/browser/browser_about_handler.cc |
+++ b/chrome/browser/browser_about_handler.cc |
@@ -47,6 +47,7 @@ |
#include "content/browser/gpu/gpu_process_host.h" |
#include "content/browser/renderer_host/render_process_host.h" |
#include "content/browser/renderer_host/render_view_host.h" |
+#include "content/browser/sensors/sensors_provider.h" |
#include "content/common/gpu/gpu_messages.h" |
#include "crypto/nss_util.h" |
#include "googleurl/src/gurl.h" |
@@ -1501,6 +1502,23 @@ bool WillHandleBrowserAboutURL(GURL* url, |
} else if (host == chrome::kChromeUIGpuHangHost) { |
GpuProcessHost::SendOnIO( |
0, content::CAUSE_FOR_GPU_LAUNCH_ABOUT_GPUHANG, new GpuMsg_Hang()); |
+#if defined(OS_CHROMEOS) |
+ } else if (host == chrome::kChromeUIRotateHost) { |
+ sensors::ScreenOrientation change; |
+ std::string query(url->query()); |
+ if (query == "left") { |
+ change.upward = sensors::ScreenOrientation::LEFT; |
+ } else if (query == "right") { |
+ change.upward = sensors::ScreenOrientation::RIGHT; |
+ } else if (query == "top") { |
+ change.upward = sensors::ScreenOrientation::TOP; |
+ } else if (query == "bottom") { |
+ change.upward = sensors::ScreenOrientation::BOTTOM; |
+ } |
sky
2011/08/17 16:39:42
else NOTREACHED?
|
+ sensors::Provider::GetInstance()->ScreenOrientationChanged(change); |
+ host = chrome::kChromeUIBlankHost; |
sky
2011/08/17 16:39:42
Add a comment as to why you need to reset the host
|
+ *url = GURL(chrome::kChromeUIBlankHost); |
+#endif |
} |
// Initialize any potentially corresponding AboutSource handler. |