| Index: chrome/browser/browser_about_handler.cc
|
| diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
|
| index 580559953cf18050adf450c563674bd8c01921be..137a4077212bb1a8affcc2b56bec46a07b469132 100644
|
| --- a/chrome/browser/browser_about_handler.cc
|
| +++ b/chrome/browser/browser_about_handler.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/browser_about_handler.h"
|
|
|
| #include <algorithm>
|
| +#include <iostream>
|
| #include <string>
|
| #include <vector>
|
|
|
| @@ -47,6 +48,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/provider.h"
|
| #include "content/common/gpu/gpu_messages.h"
|
| #include "crypto/nss_util.h"
|
| #include "googleurl/src/gurl.h"
|
| @@ -1449,6 +1451,24 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) {
|
| } else if (host == chrome::kChromeUIGpuHangHost) {
|
| GpuProcessHost::SendOnIO(
|
| 0, content::CAUSE_FOR_GPU_LAUNCH_ABOUT_GPUHANG, new GpuMsg_Hang());
|
| + } else if (host == chrome::kChromeUIRotateHost) {
|
| + sensors::ScreenOrientationChange change;
|
| + std::string query(url->query());
|
| + if (query == "left") {
|
| + change.upward = sensors::ScreenOrientationChange::LEFT;
|
| + } else if (query == "right") {
|
| + change.upward = sensors::ScreenOrientationChange::RIGHT;
|
| + } else if (query == "top") {
|
| + change.upward = sensors::ScreenOrientationChange::TOP;
|
| + } else if (query == "bottom") {
|
| + change.upward = sensors::ScreenOrientationChange::BOTTOM;
|
| + }
|
| + std::string data(reinterpret_cast<const char*>(&change), sizeof(change));
|
| + sensors::Provider::GetInstance()->FireSensorChanged(
|
| + sensors::kScreenOrientationChannel, data);
|
| +
|
| + host = chrome::kChromeUIBlankHost;
|
| + *url = GURL(chrome::kChromeUIBlankHost);
|
| }
|
|
|
| // Initialize any potentially corresponding AboutSource handler.
|
|
|