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

Unified Diff: views/controls/menu/menu_host_gtk.cc

Issue 6756043: Consolidate Widget Event code, other cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional code consolidation, move base defs, nix MakeMSG, TooltipManager 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 side-by-side diff with in-line comments
Download patch
Index: views/controls/menu/menu_host_gtk.cc
diff --git a/views/controls/menu/menu_host_gtk.cc b/views/controls/menu/menu_host_gtk.cc
index 5552fbe0044ba0db919ea2e557b605aa6f23b66a..8786dafee913c2e6d794aab14e136d4fda0d6c0c 100644
--- a/views/controls/menu/menu_host_gtk.cc
+++ b/views/controls/menu/menu_host_gtk.cc
@@ -36,7 +36,7 @@ MenuHostGtk::MenuHostGtk(SubmenuView* submenu)
if (event) {
if (event->type == GDK_BUTTON_PRESS || event->type == GDK_2BUTTON_PRESS ||
event->type == GDK_3BUTTON_PRESS) {
- set_mouse_down(true);
+ is_mouse_button_pressed_ = true;
}
gdk_event_free(event);
}
@@ -96,7 +96,7 @@ void MenuHostGtk::SetMenuHostBounds(const gfx::Rect& bounds) {
}
void MenuHostGtk::ReleaseMenuHostCapture() {
- ReleaseNativeCapture();
+ ReleaseMouseCapture();
}
gfx::NativeWindow MenuHostGtk::GetMenuHostWindow() {
@@ -107,12 +107,12 @@ RootView* MenuHostGtk::CreateRootView() {
return new MenuHostRootView(this, submenu_);
}
-bool MenuHostGtk::ReleaseCaptureOnMouseReleased() {
+bool MenuHostGtk::ShouldReleaseCaptureOnMouseReleased() const {
return false;
}
-void MenuHostGtk::ReleaseNativeCapture() {
- WidgetGtk::ReleaseNativeCapture();
+void MenuHostGtk::ReleaseMouseCapture() {
+ WidgetGtk::ReleaseMouseCapture();
if (did_input_grab_) {
did_input_grab_ = false;
gdk_pointer_ungrab(GDK_CURRENT_TIME);
@@ -146,7 +146,7 @@ void MenuHostGtk::HandleXGrabBroke() {
void MenuHostGtk::HandleGtkGrabBroke() {
// Grab can be broken by drag & drop, other menu or screen locker.
if (did_input_grab_ && !destroying_) {
- ReleaseNativeCapture();
+ ReleaseMouseCapture();
CancelAllIfNoDrag();
}
WidgetGtk::HandleGtkGrabBroke();
@@ -161,7 +161,7 @@ void MenuHostGtk::DoCapture() {
gtk_grab_remove(current_grab_window);
// Make sure all app mouse/keyboard events are targetted at us only.
- SetNativeCapture();
+ SetMouseCapture();
// And do a grab. NOTE: we do this to ensure we get mouse/keyboard
// events from other apps, a grab done with gtk_grab_add doesn't get

Powered by Google App Engine
This is Rietveld 408576698