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

Side by Side Diff: ash/launcher/launcher_tooltip_manager.cc

Issue 11280290: events: Change gesture-event handler in EventHandler to not return any values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/launcher/launcher_tooltip_manager.h" 5 #include "ash/launcher/launcher_tooltip_manager.h"
6 6
7 #include "ash/launcher/launcher_view.h" 7 #include "ash/launcher/launcher_view.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/session_state_controller.h" 10 #include "ash/wm/session_state_controller.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 return ui::ER_UNHANDLED; 295 return ui::ER_UNHANDLED;
296 } 296 }
297 297
298 ui::EventResult LauncherTooltipManager::OnTouchEvent(ui::TouchEvent* event) { 298 ui::EventResult LauncherTooltipManager::OnTouchEvent(ui::TouchEvent* event) {
299 aura::Window* target = static_cast<aura::Window*>(event->target()); 299 aura::Window* target = static_cast<aura::Window*>(event->target());
300 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target) 300 if (widget_ && widget_->IsVisible() && widget_->GetNativeWindow() != target)
301 Close(); 301 Close();
302 return ui::ER_UNHANDLED; 302 return ui::ER_UNHANDLED;
303 } 303 }
304 304
305 ui::EventResult LauncherTooltipManager::OnGestureEvent( 305 void LauncherTooltipManager::OnGestureEvent(ui::GestureEvent* event) {
306 ui::GestureEvent* event) {
307 if (widget_ && widget_->IsVisible()) { 306 if (widget_ && widget_->IsVisible()) {
308 // Because this mouse event may arrive to |view_|, here we just schedule 307 // Because this mouse event may arrive to |view_|, here we just schedule
309 // the closing event rather than directly calling Close(). 308 // the closing event rather than directly calling Close().
310 CloseSoon(); 309 CloseSoon();
311 } 310 }
312
313 return ui::ER_UNHANDLED;
314 } 311 }
315 312
316 void LauncherTooltipManager::OnSessionStateEvent( 313 void LauncherTooltipManager::OnSessionStateEvent(
317 SessionStateObserver::EventType event) { 314 SessionStateObserver::EventType event) {
318 if (event == SessionStateObserver::EVENT_PRELOCK_ANIMATION_STARTED || 315 if (event == SessionStateObserver::EVENT_PRELOCK_ANIMATION_STARTED ||
319 event == SessionStateObserver::EVENT_LOCK_ANIMATION_STARTED) 316 event == SessionStateObserver::EVENT_LOCK_ANIMATION_STARTED)
320 Close(); 317 Close();
321 } 318 }
322 319
323 void LauncherTooltipManager::WillDeleteShelf() { 320 void LauncherTooltipManager::WillDeleteShelf() {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 375
379 gfx::NativeView native_view = widget_->GetNativeView(); 376 gfx::NativeView native_view = widget_->GetNativeView();
380 views::corewm::SetWindowVisibilityAnimationType( 377 views::corewm::SetWindowVisibilityAnimationType(
381 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); 378 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
382 views::corewm::SetWindowVisibilityAnimationTransition( 379 views::corewm::SetWindowVisibilityAnimationTransition(
383 native_view, views::corewm::ANIMATE_HIDE); 380 native_view, views::corewm::ANIMATE_HIDE);
384 } 381 }
385 382
386 } // namespace internal 383 } // namespace internal
387 } // namespace ash 384 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_tooltip_manager.h ('k') | ash/launcher/launcher_tooltip_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698