OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 } else if (host == chrome::kChromeUIGpuCrashHost) { | 1568 } else if (host == chrome::kChromeUIGpuCrashHost) { |
1569 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::FromID(0); | 1569 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::FromID(0); |
1570 if (shim) | 1570 if (shim) |
1571 shim->SimulateCrash(); | 1571 shim->SimulateCrash(); |
1572 } else if (host == chrome::kChromeUIGpuHangHost) { | 1572 } else if (host == chrome::kChromeUIGpuHangHost) { |
1573 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::FromID(0); | 1573 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::FromID(0); |
1574 if (shim) | 1574 if (shim) |
1575 shim->SimulateHang(); | 1575 shim->SimulateHang(); |
1576 #if defined(OS_CHROMEOS) | 1576 #if defined(OS_CHROMEOS) |
1577 } else if (host == chrome::kChromeUIRotateHost) { | 1577 } else if (host == chrome::kChromeUIRotateHost) { |
1578 sensors::ScreenOrientation change; | 1578 content::ScreenOrientation change; |
1579 std::string query(url->query()); | 1579 std::string query(url->query()); |
1580 if (query == "left") { | 1580 if (query == "left") { |
1581 change.upward = sensors::ScreenOrientation::LEFT; | 1581 change = content::SCREEN_ORIENTATION_LEFT; |
1582 } else if (query == "right") { | 1582 } else if (query == "right") { |
1583 change.upward = sensors::ScreenOrientation::RIGHT; | 1583 change = content::SCREEN_ORIENTATION_RIGHT; |
1584 } else if (query == "top") { | 1584 } else if (query == "top") { |
1585 change.upward = sensors::ScreenOrientation::TOP; | 1585 change = content::SCREEN_ORIENTATION_TOP; |
1586 } else if (query == "bottom") { | 1586 } else if (query == "bottom") { |
1587 change.upward = sensors::ScreenOrientation::BOTTOM; | 1587 change = content::SCREEN_ORIENTATION_BOTTOM; |
1588 } else { | 1588 } else { |
1589 NOTREACHED() << "Unknown orientation"; | 1589 NOTREACHED() << "Unknown orientation"; |
1590 } | 1590 } |
1591 sensors::Provider::GetInstance()->ScreenOrientationChanged(change); | 1591 sensors::Provider::GetInstance()->ScreenOrientationChanged(change); |
1592 // Nothing to communicate to the user, so show a blank page. | 1592 // Nothing to communicate to the user, so show a blank page. |
1593 host = chrome::kChromeUIBlankHost; | 1593 host = chrome::kChromeUIBlankHost; |
1594 *url = GURL(chrome::kChromeUIBlankHost); | 1594 *url = GURL(chrome::kChromeUIBlankHost); |
1595 #endif | 1595 #endif |
1596 } | 1596 } |
1597 | 1597 |
(...skipping 19 matching lines...) Expand all Loading... |
1617 return false; | 1617 return false; |
1618 } | 1618 } |
1619 | 1619 |
1620 std::vector<std::string> ChromePaths() { | 1620 std::vector<std::string> ChromePaths() { |
1621 std::vector<std::string> paths; | 1621 std::vector<std::string> paths; |
1622 paths.reserve(arraysize(kChromePaths)); | 1622 paths.reserve(arraysize(kChromePaths)); |
1623 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1623 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
1624 paths.push_back(kChromePaths[i]); | 1624 paths.push_back(kChromePaths[i]); |
1625 return paths; | 1625 return paths; |
1626 } | 1626 } |
OLD | NEW |