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

Side by Side Diff: ui/views/widget/widget.h

Issue 12529012: Context menu on views must show on mouse down for non-WIN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 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
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 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 #include <vector> 10 #include <vector>
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // A secondary widget is one that is automatically closed (via Close()) when 451 // A secondary widget is one that is automatically closed (via Close()) when
452 // all non-secondary widgets are closed. 452 // all non-secondary widgets are closed.
453 // Default is true. 453 // Default is true.
454 // TODO(beng): This is an ugly API, should be handled implicitly via 454 // TODO(beng): This is an ugly API, should be handled implicitly via
455 // transience. 455 // transience.
456 void set_is_secondary_widget(bool is_secondary_widget) { 456 void set_is_secondary_widget(bool is_secondary_widget) {
457 is_secondary_widget_ = is_secondary_widget; 457 is_secondary_widget_ = is_secondary_widget;
458 } 458 }
459 bool is_secondary_widget() const { return is_secondary_widget_; } 459 bool is_secondary_widget() const { return is_secondary_widget_; }
460 460
461 void set_is_mouse_button_pressed(bool is_mouse_button_pressed) {
462 is_mouse_button_pressed_ = is_mouse_button_pressed;
463 }
464
461 // Returns whether the Widget is visible to the user. 465 // Returns whether the Widget is visible to the user.
462 virtual bool IsVisible() const; 466 virtual bool IsVisible() const;
463 467
464 // Returns the ThemeProvider that provides theme resources for this Widget. 468 // Returns the ThemeProvider that provides theme resources for this Widget.
465 virtual ui::ThemeProvider* GetThemeProvider() const; 469 virtual ui::ThemeProvider* GetThemeProvider() const;
466 470
467 ui::NativeTheme* GetNativeTheme() { 471 ui::NativeTheme* GetNativeTheme() {
468 return const_cast<ui::NativeTheme*>( 472 return const_cast<ui::NativeTheme*>(
469 const_cast<const Widget*>(this)->GetNativeTheme()); 473 const_cast<const Widget*>(this)->GetNativeTheme());
470 } 474 }
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 // True when window movement via mouse interaction with the frame should be 851 // True when window movement via mouse interaction with the frame should be
848 // disabled. 852 // disabled.
849 bool movement_disabled_; 853 bool movement_disabled_;
850 854
851 DISALLOW_COPY_AND_ASSIGN(Widget); 855 DISALLOW_COPY_AND_ASSIGN(Widget);
852 }; 856 };
853 857
854 } // namespace views 858 } // namespace views
855 859
856 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 860 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/view.cc ('k') | ui/views/widget/widget.cc » ('j') | ui/views/widget/widget.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698