summaryrefslogtreecommitdiffstats
path: root/ash/launcher
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-08 18:05:25 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-08 18:05:25 +0000
commitca70609833412dd0cdc758724a92681474d62ee2 (patch)
tree3f101230764f644cd1c0a2b7cb52aa556991aa82 /ash/launcher
parentcb3221b804cdad65aaade7faff1f612644dee4a3 (diff)
downloadchromium_src-ca70609833412dd0cdc758724a92681474d62ee2.zip
chromium_src-ca70609833412dd0cdc758724a92681474d62ee2.tar.gz
chromium_src-ca70609833412dd0cdc758724a92681474d62ee2.tar.bz2
Convert Aura to use ui::Event.
http://crbug.com/125937 TEST=existing Review URL: https://chromiumcodereview.appspot.com/10827145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher')
-rw-r--r--ash/launcher/launcher_button.cc1
-rw-r--r--ash/launcher/launcher_tooltip_manager.cc14
-rw-r--r--ash/launcher/launcher_tooltip_manager.h11
-rw-r--r--ash/launcher/launcher_tooltip_manager_unittest.cc14
-rw-r--r--ash/launcher/launcher_view_unittest.cc14
5 files changed, 27 insertions, 27 deletions
diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc
index 00bd697..af9b0e1 100644
--- a/ash/launcher/launcher_button.cc
+++ b/ash/launcher/launcher_button.cc
@@ -10,7 +10,6 @@
#include "ash/launcher/launcher_button_host.h"
#include "grit/ui_resources.h"
#include "skia/ext/image_operations.h"
-#include "ui/aura/event.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/throb_animation.h"
diff --git a/ash/launcher/launcher_tooltip_manager.cc b/ash/launcher/launcher_tooltip_manager.cc
index 2065d3a..e83407f 100644
--- a/ash/launcher/launcher_tooltip_manager.cc
+++ b/ash/launcher/launcher_tooltip_manager.cc
@@ -12,9 +12,9 @@
#include "base/message_loop.h"
#include "base/time.h"
#include "base/timer.h"
-#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
+#include "ui/base/event.h"
#include "ui/base/events.h"
#include "ui/gfx/insets.h"
#include "ui/views/bubble/bubble_delegate.h"
@@ -290,13 +290,13 @@ bool LauncherTooltipManager::IsVisible() {
}
bool LauncherTooltipManager::PreHandleKeyEvent(aura::Window* target,
- aura::KeyEvent* event) {
+ ui::KeyEvent* event) {
// Not handled.
return false;
}
bool LauncherTooltipManager::PreHandleMouseEvent(aura::Window* target,
- aura::MouseEvent* event) {
+ ui::MouseEvent* event) {
DCHECK(target);
DCHECK(event);
if (!widget_ || !widget_->IsVisible())
@@ -311,12 +311,12 @@ bool LauncherTooltipManager::PreHandleMouseEvent(aura::Window* target,
}
gfx::Point location_in_launcher_view = event->location();
- aura::Window::ConvertPointToWindow(
+ aura::Window::ConvertPointToTarget(
target, launcher_view_->GetWidget()->GetNativeWindow(),
&location_in_launcher_view);
gfx::Point location_on_screen = event->location();
- aura::Window::ConvertPointToWindow(
+ aura::Window::ConvertPointToTarget(
target, target->GetRootWindow(), &location_on_screen);
gfx::Rect bubble_rect = widget_->GetWindowBoundsInScreen();
@@ -331,14 +331,14 @@ bool LauncherTooltipManager::PreHandleMouseEvent(aura::Window* target,
}
ui::TouchStatus LauncherTooltipManager::PreHandleTouchEvent(
- aura::Window* target, aura::TouchEvent* event) {
+ aura::Window* target, ui::TouchEventImpl* event) {
if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target)
Close();
return ui::TOUCH_STATUS_UNKNOWN;
}
ui::GestureStatus LauncherTooltipManager::PreHandleGestureEvent(
- aura::Window* target, aura::GestureEvent* event) {
+ aura::Window* target, ui::GestureEventImpl* event) {
if (widget_ && widget_->IsVisible()) {
// Because this mouse event may arrive to |view_|, here we just schedule
// the closing event rather than directly calling Close().
diff --git a/ash/launcher/launcher_tooltip_manager.h b/ash/launcher/launcher_tooltip_manager.h
index 4e50118..95c9fcf 100644
--- a/ash/launcher/launcher_tooltip_manager.h
+++ b/ash/launcher/launcher_tooltip_manager.h
@@ -72,14 +72,15 @@ class ASH_EXPORT LauncherTooltipManager : public aura::EventFilter,
protected:
// aura::EventFilter overrides:
virtual bool PreHandleKeyEvent(aura::Window* target,
- aura::KeyEvent* event) OVERRIDE;
+ ui::KeyEvent* event) OVERRIDE;
virtual bool PreHandleMouseEvent(aura::Window* target,
- aura::MouseEvent* event) OVERRIDE;
- virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
- aura::TouchEvent* event) OVERRIDE;
+ ui::MouseEvent* event) OVERRIDE;
+ virtual ui::TouchStatus PreHandleTouchEvent(
+ aura::Window* target,
+ ui::TouchEventImpl* event) OVERRIDE;
virtual ui::GestureStatus PreHandleGestureEvent(
aura::Window* target,
- aura::GestureEvent* event) OVERRIDE;
+ ui::GestureEventImpl* event) OVERRIDE;
// ShelfLayoutManager::Observer overrides:
virtual void WillDeleteShelf() OVERRIDE;
diff --git a/ash/launcher/launcher_tooltip_manager_unittest.cc b/ash/launcher/launcher_tooltip_manager_unittest.cc
index 6d14c89..391d948 100644
--- a/ash/launcher/launcher_tooltip_manager_unittest.cc
+++ b/ash/launcher/launcher_tooltip_manager_unittest.cc
@@ -9,9 +9,9 @@
#include "ash/wm/window_util.h"
#include "base/string16.h"
#include "base/time.h"
-#include "ui/aura/event.h"
#include "ui/aura/event_filter.h"
#include "ui/aura/root_window.h"
+#include "ui/base/event.h"
#include "ui/base/events.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/views/widget/widget.h"
@@ -141,12 +141,12 @@ TEST_F(LauncherTooltipManagerTest, ShouldHideForEvents) {
aura::EventFilter* event_filter = GetEventFilter();
// Should not hide for key events.
- aura::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE);
+ ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE);
EXPECT_FALSE(event_filter->PreHandleKeyEvent(root_window, &key_event));
EXPECT_TRUE(TooltipIsVisible());
// Should hide for touch events.
- aura::TouchEvent touch_event(
+ ui::TouchEventImpl touch_event(
ui::ET_TOUCH_PRESSED, gfx::Point(), 0, base::TimeDelta());
EXPECT_EQ(ui::TOUCH_STATUS_UNKNOWN,
event_filter->PreHandleTouchEvent(root_window, &touch_event));
@@ -161,7 +161,7 @@ TEST_F(LauncherTooltipManagerTest, ShouldHideForEvents) {
EXPECT_TRUE(TooltipIsVisible());
// Should hide for gesture events.
- aura::GestureEvent gesture_event(
+ ui::GestureEventImpl gesture_event(
ui::ET_GESTURE_BEGIN, 0, 0, ui::EF_NONE, base::Time(),
ui::GestureEventDetails(ui::ET_GESTURE_BEGIN, 0.0f, 0.0f), 0);
EXPECT_EQ(ui::GESTURE_STATUS_UNKNOWN,
@@ -181,9 +181,9 @@ TEST_F(LauncherTooltipManagerTest, HideForMouseEvent) {
ASSERT_FALSE(tooltip_rect.IsEmpty());
// Shouldn't hide if the mouse is in the tooltip.
- aura::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, tooltip_rect.CenterPoint(),
- tooltip_rect.CenterPoint(), ui::EF_NONE);
- aura::LocatedEvent::TestApi test_api(&mouse_event);
+ ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, tooltip_rect.CenterPoint(),
+ tooltip_rect.CenterPoint(), ui::EF_NONE);
+ ui::LocatedEvent::TestApi test_api(&mouse_event);
EXPECT_FALSE(event_filter->PreHandleMouseEvent(root_window, &mouse_event));
EXPECT_TRUE(TooltipIsVisible());
diff --git a/ash/launcher/launcher_view_unittest.cc b/ash/launcher/launcher_view_unittest.cc
index 5868352..8e48067 100644
--- a/ash/launcher/launcher_view_unittest.cc
+++ b/ash/launcher/launcher_view_unittest.cc
@@ -20,9 +20,9 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "grit/ui_resources.h"
-#include "ui/aura/event.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/window.h"
+#include "ui/base/event.h"
#include "ui/base/events.h"
#include "ui/compositor/layer.h"
#include "ui/views/widget/widget.h"
@@ -268,17 +268,17 @@ class LauncherViewTest : public AshTestBase {
// Mouse down.
views::View* button = test_api_->GetButton(button_index);
- aura::MouseEvent click_event(ui::ET_MOUSE_PRESSED,
- button->bounds().origin(),
- button->bounds().origin(), 0);
+ ui::MouseEvent click_event(ui::ET_MOUSE_PRESSED,
+ button->bounds().origin(),
+ button->bounds().origin(), 0);
views::MouseEvent views_click_event(&click_event);
button_host->PointerPressedOnButton(button, pointer, views_click_event);
// Drag.
views::View* destination = test_api_->GetButton(destination_index);
- aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED,
- destination->bounds().origin(),
- destination->bounds().origin(), 0);
+ ui::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED,
+ destination->bounds().origin(),
+ destination->bounds().origin(), 0);
views::MouseEvent views_drag_event(&drag_event);
button_host->PointerDraggedOnButton(button, pointer, views_drag_event);
return button;