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

Unified Diff: ui/aura/test/event_generator.cc

Issue 8771015: Rename Desktop->RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/test_stacking_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/event_generator.cc
===================================================================
--- ui/aura/test/event_generator.cc (revision 113260)
+++ ui/aura/test/event_generator.cc (working copy)
@@ -4,15 +4,15 @@
#include "ui/aura/test/event_generator.h"
-#include "ui/aura/desktop.h"
#include "ui/aura/event.h"
+#include "ui/aura/root_window.h"
namespace {
-gfx::Point CenterOfWindowInDesktopCoordinate(aura::Window* window) {
+gfx::Point CenterOfWindowInRootWindowCoordinate(aura::Window* window) {
gfx::Point center = window->bounds().CenterPoint();
- aura::Desktop* desktop = aura::Desktop::GetInstance();
- aura::Window::ConvertPointToWindow(window->parent(), desktop, &center);
+ aura::RootWindow* root_window = aura::RootWindow::GetInstance();
+ aura::Window::ConvertPointToWindow(window->parent(), root_window, &center);
return center;
}
@@ -31,7 +31,7 @@
EventGenerator::EventGenerator(Window* window)
: flags_(0),
- current_location_(CenterOfWindowInDesktopCoordinate(window)) {
+ current_location_(CenterOfWindowInRootWindowCoordinate(window)) {
}
EventGenerator::~EventGenerator() {
@@ -94,7 +94,7 @@
switch (event.type()) {
case ui::ET_KEY_PRESSED:
case ui::ET_KEY_RELEASED:
- aura::Desktop::GetInstance()->DispatchKeyEvent(
+ aura::RootWindow::GetInstance()->DispatchKeyEvent(
static_cast<KeyEvent*>(&event));
break;
case ui::ET_MOUSE_PRESSED:
@@ -104,7 +104,7 @@
case ui::ET_MOUSE_ENTERED:
case ui::ET_MOUSE_EXITED:
case ui::ET_MOUSEWHEEL:
- aura::Desktop::GetInstance()->DispatchMouseEvent(
+ aura::RootWindow::GetInstance()->DispatchMouseEvent(
static_cast<MouseEvent*>(&event));
break;
default:
@@ -114,7 +114,7 @@
}
void EventGenerator::MoveMouseToCenterOf(Window* window) {
- MoveMouseTo(CenterOfWindowInDesktopCoordinate(window));
+ MoveMouseTo(CenterOfWindowInRootWindowCoordinate(window));
}
} // namespace test
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/test_stacking_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698