Chromium Code Reviews| Index: chrome/browser/ui/touch/frame/touch_browser_frame_view.h |
| diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h |
| index 35da0b543bd2287ddda428a927de357b08ca2310..f81be5341c31c1e2468c10db62ad06cf00085f66 100644 |
| --- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h |
| +++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h |
| @@ -9,6 +9,7 @@ |
| #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
| #include "chrome/common/notification_observer.h" |
| #include "chrome/common/notification_registrar.h" |
| +#include "views/focus/focus_manager.h" |
| class BrowserFrame; |
| class BrowserView; |
| @@ -19,20 +20,36 @@ class NotificationSource; |
| class TouchBrowserFrameView : public OpaqueBrowserFrameView, |
| public NotificationObserver { |
| public: |
| + |
| + // A focus listener that performs touch specific tasks on focus change such |
| + // as showing/hiding virtual keyboard. |
| + class TouchBrowserFocusChangeListener : public views::FocusChangeListener { |
|
bryeung
2011/01/27 20:50:34
It seems a more common idiom might be to make Touc
varunjain
2011/01/27 23:01:38
Done.
|
| + public: |
| + TouchBrowserFocusChangeListener(TouchBrowserFrameView* browser_frame); |
|
oshima
2011/01/27 19:58:33
explicit
varunjain
2011/01/27 23:01:38
not needed anymore.
|
| + |
| + // views::FocusChangeListener implementation |
| + virtual void FocusWillChange(views::View* focused_before, |
| + views::View* focused_now); |
|
oshima
2011/01/27 19:58:33
indent should be either
function(a,
b)
fu
varunjain
2011/01/27 23:01:38
Done.
|
| + |
| + private: |
| + TouchBrowserFrameView* touch_browser_frame_; |
|
oshima
2011/01/27 19:58:33
DISALLOW_COPY_AND_ASSIGN
varunjain
2011/01/27 23:01:38
not needed anymore
|
| + }; |
|
oshima
2011/01/27 19:58:33
Does this needs to be here? If not, I'd prefer to
varunjain
2011/01/27 23:01:38
not needed anymore
|
| + |
| // Constructs a non-client view for an BrowserFrame. |
| TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); |
| virtual ~TouchBrowserFrameView(); |
| // Overridden from OpaqueBrowserFrameView |
| virtual void Layout(); |
| + virtual void UpdateKeyboardAndLayout(bool should_show_keyboard); |
| protected: |
| // Overridden from OpaqueBrowserFrameView |
| virtual int GetReservedHeight() const; |
| + virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); |
| private: |
| virtual void InitVirtualKeyboard(); |
| - virtual void UpdateKeyboardAndLayout(bool should_show_keyboard); |
| // Overridden from NotificationObserver. |
| virtual void Observe(NotificationType type, |
| @@ -42,6 +59,7 @@ class TouchBrowserFrameView : public OpaqueBrowserFrameView, |
| bool keyboard_showing_; |
| KeyboardContainerView* keyboard_; |
| NotificationRegistrar registrar_; |
| + scoped_ptr<TouchBrowserFocusChangeListener> focus_change_listener_; |
|
oshima
2011/01/27 19:58:33
can this be just a FocusChangeListener?
varunjain
2011/01/27 23:01:38
not needed anymore
|
| DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView); |
| }; |