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

Unified Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.h

Issue 6384004: Browser should get notified if a views textfield changes focus. In addition, (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Minor changes that were missed in last patch Created 9 years, 11 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: 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 c06600faa6233d630558b303ceae7777ad01a6cd..958aa6f8a99b8041758155ae2618afe1173ab665 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
@@ -10,6 +10,7 @@
#include "chrome/browser/tabs/tab_strip_model_observer.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "views/focus/focus_manager.h"
class BrowserFrame;
class BrowserView;
@@ -18,6 +19,7 @@ class NotificationDetails;
class NotificationSource;
class TouchBrowserFrameView : public OpaqueBrowserFrameView,
+ public views::FocusChangeListener,
public TabStripModelObserver,
public NotificationObserver {
public:
@@ -28,9 +30,14 @@ class TouchBrowserFrameView : public OpaqueBrowserFrameView,
// Overridden from OpaqueBrowserFrameView
virtual void Layout();
+ // views::FocusChangeListener implementation
+ virtual void FocusWillChange(views::View* focused_before,
+ views::View* focused_now);
+
protected:
// Overridden from OpaqueBrowserFrameView
virtual int GetReservedHeight() const;
+ virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
private:
virtual void InitVirtualKeyboard();
@@ -50,6 +57,7 @@ class TouchBrowserFrameView : public OpaqueBrowserFrameView,
bool keyboard_showing_;
KeyboardContainerView* keyboard_;
NotificationRegistrar registrar_;
+ bool focus_listener_added_;
DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView);
};

Powered by Google App Engine
This is Rietveld 408576698