diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-14 01:37:25 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-14 01:37:25 +0000 |
commit | 48caa1cc6277c4e50a79e1a6d70bfce9b36bc188 (patch) | |
tree | a531d8d91e7449baed9df57736ddb24f5d1d17b1 | |
parent | d8c48630a32ff4a4d447e33b11e6858604ff9dfb (diff) | |
download | chromium_src-48caa1cc6277c4e50a79e1a6d70bfce9b36bc188.zip chromium_src-48caa1cc6277c4e50a79e1a6d70bfce9b36bc188.tar.gz chromium_src-48caa1cc6277c4e50a79e1a6d70bfce9b36bc188.tar.bz2 |
Get the TabContents from the NavigationController instead of from the Browser (which may not exist).
BUG=none
TEST=none
TBR=varunjain@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85362 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/touch/frame/touch_browser_frame_view.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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 491e162..946b7ca 100644 --- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc +++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc @@ -247,8 +247,10 @@ void TouchBrowserFrameView::Observe(NotificationType type, GetFocusedStateAccessor()->SetProperty( source_tab->property_bag(), editable); } else if (type == NotificationType::NAV_ENTRY_COMMITTED) { + NavigationController* controller = + Source<NavigationController>(source).ptr(); Browser* source_browser = Browser::GetBrowserForController( - Source<NavigationController>(source).ptr(), NULL); + controller, NULL); // If the Browser for the keyboard has navigated, re-evaluate the visibility // of the keyboard. @@ -260,7 +262,7 @@ void TouchBrowserFrameView::Observe(NotificationType type, if (view->GetClassName() == RenderWidgetHostViewViews::kViewClassName) { // Reset the state of the focused field in the current tab. GetFocusedStateAccessor()->SetProperty( - source_browser->GetSelectedTabContents()->property_bag(), false); + controller->tab_contents()->property_bag(), false); } } if (source_browser == browser) |