Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: athena/screen/screen_accelerator_handler.cc

Issue 475533008: Revert of Rotate screen in response to accelerator or device orientation sensors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/screen/public/screen_manager.h ('k') | athena/screen/screen_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/screen/screen_accelerator_handler.cc
diff --git a/athena/screen/screen_accelerator_handler.cc b/athena/screen/screen_accelerator_handler.cc
index 97c08ec4aa38e45c366222eff2ead6c27cba45c3..031a039dc68a2e1ecdc83b557a307da41deb522c 100644
--- a/athena/screen/screen_accelerator_handler.cc
+++ b/athena/screen/screen_accelerator_handler.cc
@@ -5,13 +5,10 @@
#include "athena/screen/screen_accelerator_handler.h"
#include "athena/input/public/accelerator_manager.h"
-#include "athena/screen/public/screen_manager.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tree_host.h"
#include "ui/compositor/debug_utils.h"
-#include "ui/gfx/display.h"
-#include "ui/gfx/screen.h"
#include "ui/wm/public/activation_client.h"
namespace athena {
@@ -20,7 +17,6 @@
enum Command {
CMD_PRINT_LAYER_HIERARCHY,
CMD_PRINT_WINDOW_HIERARCHY,
- CMD_ROTATE_SCREEN,
};
const int EF_ALL_DOWN =
@@ -31,9 +27,6 @@
AF_DEBUG},
{TRIGGER_ON_PRESS, ui::VKEY_W, EF_ALL_DOWN, CMD_PRINT_WINDOW_HIERARCHY,
AF_DEBUG},
- {TRIGGER_ON_PRESS, ui::VKEY_F3,
- ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN,
- CMD_ROTATE_SCREEN, AF_NONE},
};
void PrintLayerHierarchy(aura::Window* root_window) {
@@ -70,20 +63,6 @@
LOG(ERROR) << out.str();
}
-void HandleRotateScreen() {
- ScreenManager* screen_manager = ScreenManager::Get();
- gfx::Display::Rotation current_rotation =
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().rotation();
- if (current_rotation == gfx::Display::ROTATE_0)
- screen_manager->SetRotation(gfx::Display::ROTATE_90);
- else if (current_rotation == gfx::Display::ROTATE_90)
- screen_manager->SetRotation(gfx::Display::ROTATE_180);
- else if (current_rotation == gfx::Display::ROTATE_180)
- screen_manager->SetRotation(gfx::Display::ROTATE_270);
- else if (current_rotation == gfx::Display::ROTATE_270)
- screen_manager->SetRotation(gfx::Display::ROTATE_0);
-}
-
} // namespace
// static
@@ -110,9 +89,6 @@
case CMD_PRINT_WINDOW_HIERARCHY:
HandlePrintWindowHierarchy(root_window_);
return true;
- case CMD_ROTATE_SCREEN:
- HandleRotateScreen();
- return true;
}
return false;
}
« no previous file with comments | « athena/screen/public/screen_manager.h ('k') | athena/screen/screen_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698