Index: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc |
diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc |
index 545f31cc28923a2116a3dff889799778bdae21da..f80ae5b29707b690c20a53c09f38d866b198ebf4 100644 |
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc |
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc |
@@ -8,7 +8,9 @@ |
#include "chrome/browser/renderer_host/render_view_host.h" |
#include "chrome/browser/tab_contents/navigation_controller.h" |
#include "chrome/browser/tab_contents/tab_contents.h" |
+#include "chrome/browser/tabs/tab_strip_model.h" |
#include "chrome/browser/ui/browser.h" |
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
#include "chrome/browser/ui/touch/frame/keyboard_container_view.h" |
#include "chrome/browser/ui/views/frame/browser_view.h" |
#include "chrome/common/notification_service.h" |
@@ -35,9 +37,12 @@ TouchBrowserFrameView::TouchBrowserFrameView(BrowserFrame* frame, |
registrar_.Add(this, |
NotificationType::FOCUS_CHANGED_IN_PAGE, |
NotificationService::AllSources()); |
+ |
+ browser_view->browser()->tabstrip_model()->AddObserver(this); |
} |
TouchBrowserFrameView::~TouchBrowserFrameView() { |
+ browser_view()->browser()->tabstrip_model()->RemoveObserver(this); |
} |
void TouchBrowserFrameView::Layout() { |
@@ -98,6 +103,15 @@ void TouchBrowserFrameView::UpdateKeyboardAndLayout(bool should_show_keyboard) { |
} |
} |
+void TouchBrowserFrameView::TabSelectedAt(TabContentsWrapper* old_contents, |
+ TabContentsWrapper* new_contents, |
+ int index, |
+ bool user_gesture) { |
+ TabContents* contents = new_contents->tab_contents(); |
+ UpdateKeyboardAndLayout(contents->focused_field_is_editable()); |
+} |
+ |
+ |
void TouchBrowserFrameView::Observe(NotificationType type, |
const NotificationSource& source, |
const NotificationDetails& details) { |