summaryrefslogtreecommitdiffstats
path: root/views/widget/widget_gtk.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-31 22:53:37 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-31 22:53:37 +0000
commit148d105e27c7c8c2cda0c81292690b9edafcae1f (patch)
treee278052fc84a6e5399aec5bd0d423162aecb6d16 /views/widget/widget_gtk.h
parentdc75d4823b598a9b9b313728a06f6b47d6a73929 (diff)
downloadchromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.zip
chromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.tar.gz
chromium_src-148d105e27c7c8c2cda0c81292690b9edafcae1f.tar.bz2
This CL adds accelerators to the Linux toolkit views.
The MessageLoop had to be modified to support Dispatchers on Linux. BUG=None TEST=On Windows and Linux, make sure the accelerators still work as expected. On Linux toolkit views, build and run the unit-tests. Review URL: http://codereview.chromium.org/159046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_gtk.h')
-rw-r--r--views/widget/widget_gtk.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index 61a85d9..fbb6c0e 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -99,11 +99,15 @@ class WidgetGtk : public Widget, public MessageLoopForUI::Observer {
virtual Window* GetWindow();
virtual const Window* GetWindow() const;
virtual ThemeProvider* GetThemeProvider() const;
+ virtual FocusManager* GetFocusManager();
// MessageLoopForUI::Observer.
- virtual void WillProcessEvent(GdkEvent* event) {}
+ virtual void WillProcessEvent(GdkEvent* event);
virtual void DidProcessEvent(GdkEvent* event);
+ // Retrieves the WindowGtk associated with |widget|.
+ static WindowGtk* GetWindowForNative(GtkWidget* widget);
+
protected:
virtual void OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation);
virtual void OnPaint(GtkWidget* widget, GdkEventExpose* event);
@@ -135,8 +139,7 @@ class WidgetGtk : public Widget, public MessageLoopForUI::Observer {
// is true.
virtual bool ReleaseCaptureOnMouseReleased() { return true; }
- // Sets and retrieves the WidgetGtk in the userdata section of the widget.
- static WindowGtk* GetWindowForNative(GtkWidget* widget);
+ // Sets the WindowGtk in the userdata section of the widget.
static void SetWindowForNative(GtkWidget* widget, WindowGtk* window);
// Are we a subclass of WindowGtk?
@@ -215,6 +218,12 @@ class WidgetGtk : public Widget, public MessageLoopForUI::Observer {
// must be destroyed AFTER root_view_.
scoped_ptr<TooltipManagerGtk> tooltip_manager_;
+ // The focus manager keeping track of focus for this Widget and any of its
+ // children. NULL for non top-level widgets.
+ // WARNING: RootView's destructor calls into the FocusManager. As such, this
+ // must be destroyed AFTER root_view_.
+ scoped_ptr<FocusManager> focus_manager_;
+
// The root of the View hierarchy attached to this window.
scoped_ptr<RootView> root_view_;