summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 16:55:57 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 16:55:57 +0000
commit79a90d230d67c14292d1807dca6938c11de9275d (patch)
tree4efb3581363384b48b4c824bea5396c220b2366e /chrome/browser/chromeos/views
parent55c623ed0596e614e1340f36a7456e402a5ebbd4 (diff)
downloadchromium_src-79a90d230d67c14292d1807dca6938c11de9275d.zip
chromium_src-79a90d230d67c14292d1807dca6938c11de9275d.tar.gz
chromium_src-79a90d230d67c14292d1807dca6938c11de9275d.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/views')
-rw-r--r--chrome/browser/chromeos/views/webui_menu_widget.cc6
-rw-r--r--chrome/browser/chromeos/views/webui_menu_widget.h14
2 files changed, 11 insertions, 9 deletions
diff --git a/chrome/browser/chromeos/views/webui_menu_widget.cc b/chrome/browser/chromeos/views/webui_menu_widget.cc
index cfc7c2d..78dcc9e 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() {
- ReleaseGrab();
+ ReleaseNativeCapture();
WidgetGtk::Hide();
// Clears the content.
ExecuteJavascript(L"updateModel({'items':[]})");
@@ -168,8 +168,8 @@ void WebUIMenuWidget::Close() {
views::WidgetGtk::Close();
}
-void WebUIMenuWidget::ReleaseGrab() {
- WidgetGtk::ReleaseGrab();
+void WebUIMenuWidget::ReleaseNativeCapture() {
+ WidgetGtk::ReleaseNativeCapture();
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 a566920..b4d3352 100644
--- a/chrome/browser/chromeos/views/webui_menu_widget.h
+++ b/chrome/browser/chromeos/views/webui_menu_widget.h
@@ -27,12 +27,14 @@ class WebUIMenuWidget : public views::WidgetGtk {
virtual ~WebUIMenuWidget();
// WidgetGtk overrides:
- 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);
+ 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;
// Returns NativeMenuWebUI that owns this widget.
NativeMenuWebUI* webui_menu() const {