diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 18:38:28 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-15 18:38:28 +0000 |
commit | c3e5312a57b506e1a6d26dace8e8c9320b9966a3 (patch) | |
tree | 2476d7ca57e528bb0c8818452f3010f03b60191f /chrome/browser/chromeos | |
parent | 004ec925e3f71aeba2acd1461741ccddd92eeedc (diff) | |
download | chromium_src-c3e5312a57b506e1a6d26dace8e8c9320b9966a3.zip chromium_src-c3e5312a57b506e1a6d26dace8e8c9320b9966a3.tar.gz chromium_src-c3e5312a57b506e1a6d26dace8e8c9320b9966a3.tar.bz2 |
Revert 78222 - Add native capture API to Widget, and fix a bug in Window where we wouldn't let the window be closed from the X.
BUG=72040
TEST=none
TBR=sky
Review URL: http://codereview.chromium.org/6697016
TBR=ben@chromium.org
Review URL: http://codereview.chromium.org/6695028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78241 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/login/message_bubble.cc | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/message_bubble.h | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/views/webui_menu_widget.cc | 6 | ||||
-rw-r--r-- | chrome/browser/chromeos/views/webui_menu_widget.h | 14 |
4 files changed, 13 insertions, 15 deletions
diff --git a/chrome/browser/chromeos/login/message_bubble.cc b/chrome/browser/chromeos/login/message_bubble.cc index a7f76e3..b0240ce 100644 --- a/chrome/browser/chromeos/login/message_bubble.cc +++ b/chrome/browser/chromeos/login/message_bubble.cc @@ -145,9 +145,9 @@ void MessageBubble::IsActiveChanged() { } } -void MessageBubble::SetNativeCapture() { +void MessageBubble::DoGrab() { if (grab_enabled_) - WidgetGtk::SetNativeCapture(); + WidgetGtk::DoGrab(); } void MessageBubble::Close() { diff --git a/chrome/browser/chromeos/login/message_bubble.h b/chrome/browser/chromeos/login/message_bubble.h index c2dee1e..6ef33bc 100644 --- a/chrome/browser/chromeos/login/message_bubble.h +++ b/chrome/browser/chromeos/login/message_bubble.h @@ -54,7 +54,7 @@ class MessageBubble : public InfoBubble, MessageBubbleDelegate* delegate); // Overridden from WidgetGtk. - virtual void Close() OVERRIDE; + virtual void Close(); virtual gboolean OnButtonPress(GtkWidget* widget, GdkEventButton* event) { WidgetGtk::OnButtonPress(widget, event); @@ -72,7 +72,7 @@ class MessageBubble : public InfoBubble, // Overridden from WidgetGtk. virtual void IsActiveChanged(); - virtual void SetNativeCapture(); + virtual void DoGrab(); private: MessageBubble(views::WidgetGtk::Type type, diff --git a/chrome/browser/chromeos/views/webui_menu_widget.cc b/chrome/browser/chromeos/views/webui_menu_widget.cc index 78dcc9e..cfc7c2d 100644 --- a/chrome/browser/chromeos/views/webui_menu_widget.cc +++ b/chrome/browser/chromeos/views/webui_menu_widget.cc @@ -150,7 +150,7 @@ void WebUIMenuWidget::Init(gfx::NativeView parent, const gfx::Rect& bounds) { } void WebUIMenuWidget::Hide() { - ReleaseNativeCapture(); + ReleaseGrab(); WidgetGtk::Hide(); // Clears the content. ExecuteJavascript(L"updateModel({'items':[]})"); @@ -168,8 +168,8 @@ void WebUIMenuWidget::Close() { views::WidgetGtk::Close(); } -void WebUIMenuWidget::ReleaseNativeCapture() { - WidgetGtk::ReleaseNativeCapture(); +void WebUIMenuWidget::ReleaseGrab() { + WidgetGtk::ReleaseGrab(); if (did_input_grab_) { did_input_grab_ = false; gdk_pointer_ungrab(GDK_CURRENT_TIME); diff --git a/chrome/browser/chromeos/views/webui_menu_widget.h b/chrome/browser/chromeos/views/webui_menu_widget.h index b4d3352..a566920 100644 --- a/chrome/browser/chromeos/views/webui_menu_widget.h +++ b/chrome/browser/chromeos/views/webui_menu_widget.h @@ -27,14 +27,12 @@ class WebUIMenuWidget : public views::WidgetGtk { virtual ~WebUIMenuWidget(); // WidgetGtk overrides: - virtual void Init(gfx::NativeView parent, const gfx::Rect& bounds) OVERRIDE; - virtual void Hide() OVERRIDE; - virtual void Close() OVERRIDE; - virtual void ReleaseNativeCapture() OVERRIDE; - virtual gboolean OnGrabBrokeEvent(GtkWidget* widget, GdkEvent* event) - OVERRIDE; - virtual void OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) - OVERRIDE; + virtual void Init(gfx::NativeView parent, const gfx::Rect& bounds); + virtual void Hide(); + virtual void Close(); + virtual void ReleaseGrab(); + virtual gboolean OnGrabBrokeEvent(GtkWidget* widget, GdkEvent* event); + virtual void OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation); // Returns NativeMenuWebUI that owns this widget. NativeMenuWebUI* webui_menu() const { |