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

Side by Side Diff: views/controls/menu/menu_controller.h

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/link.cc ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 5 #ifndef VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
6 #define VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 6 #define VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // the appropriate events. This is used to send mouse events to child views so 387 // the appropriate events. This is used to send mouse events to child views so
388 // that they react to click-drag-release as if the user clicked on the view 388 // that they react to click-drag-release as if the user clicked on the view
389 // itself. 389 // itself.
390 void UpdateActiveMouseView(SubmenuView* event_source, 390 void UpdateActiveMouseView(SubmenuView* event_source,
391 const MouseEvent& event, 391 const MouseEvent& event,
392 View* target_menu); 392 View* target_menu);
393 393
394 // Sends a mouse release event to the current |active_mouse_view_| and sets 394 // Sends a mouse release event to the current |active_mouse_view_| and sets
395 // it to null. 395 // it to null.
396 void SendMouseReleaseToActiveView(SubmenuView* event_source, 396 void SendMouseReleaseToActiveView(SubmenuView* event_source,
397 const MouseEvent& event, 397 const MouseEvent& event);
398 bool cancel);
399 398
400 // Variant of above that sends a cancel mouse release. 399 // Sends a mouse capture lost event to the current |active_mouse_view_| and
401 void SendMouseReleaseToActiveView(); 400 // sets it to null.
401 void SendMouseCaptureLostToActiveView();
402 402
403 // The active instance. 403 // The active instance.
404 static MenuController* active_instance_; 404 static MenuController* active_instance_;
405 405
406 // If true, Run blocks. If false, Run doesn't block and this is used for 406 // If true, Run blocks. If false, Run doesn't block and this is used for
407 // drag and drop. Note that the semantics for drag and drop are slightly 407 // drag and drop. Note that the semantics for drag and drop are slightly
408 // different: cancel timer is kicked off any time the drag moves outside the 408 // different: cancel timer is kicked off any time the drag moves outside the
409 // menu, mouse events do nothing... 409 // menu, mouse events do nothing...
410 bool blocking_run_; 410 bool blocking_run_;
411 411
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 // If non-null mouse drag events are forwarded to this view. See 484 // If non-null mouse drag events are forwarded to this view. See
485 // UpdateActiveMouseView for details. 485 // UpdateActiveMouseView for details.
486 View* active_mouse_view_; 486 View* active_mouse_view_;
487 487
488 DISALLOW_COPY_AND_ASSIGN(MenuController); 488 DISALLOW_COPY_AND_ASSIGN(MenuController);
489 }; 489 };
490 490
491 } // namespace views 491 } // namespace views
492 492
493 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_ 493 #endif // VIEWS_CONTROLS_MENU_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « views/controls/link.cc ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698