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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10636023: Update BrowserView::ProcessFullscreen OmniboxViewWin use; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 3ad865d745a92da82b950c3f3a146f85fb7eb5ed..615f495fbc005063132269b66a9afeacd9ddb053 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -57,6 +57,7 @@
#include "chrome/browser/ui/views/infobars/infobar_container_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_container.h"
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
+#include "chrome/browser/ui/views/omnibox/omnibox_views.h"
#include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
#include "chrome/browser/ui/views/password_generation_bubble_view.h"
#include "chrome/browser/ui/views/status_bubble_views.h"
@@ -2134,8 +2135,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
ignore_layout_ = true;
LocationBarView* location_bar = GetLocationBarView();
#if defined(OS_WIN) && !defined(USE_AURA)
- OmniboxViewWin* omnibox_view =
- static_cast<OmniboxViewWin*>(location_bar->GetLocationEntry());
+ OmniboxViewWin* omnibox_win =
+ GetOmniboxViewWin(location_bar->GetLocationEntry());
#endif
if (type == FOR_METRO || !fullscreen) {
@@ -2153,13 +2154,15 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
focus_manager->ClearFocus();
#if defined(OS_WIN) && !defined(USE_AURA)
- // If we don't hide the edit and force it to not show until we come out of
- // fullscreen, then if the user was on the New Tab Page, the edit contents
- // will appear atop the web contents once we go into fullscreen mode. This
- // has something to do with how we move the main window while it's hidden;
- // if we don't hide the main window below, we don't get this problem.
- omnibox_view->set_force_hidden(true);
- ShowWindow(omnibox_view->m_hWnd, SW_HIDE);
+ if (omnibox_win) {
+ // If we don't hide the edit and force it to not show until we come out of
+ // fullscreen, then if the user was on the New Tab Page, the edit contents
+ // will appear atop the web contents once we go into fullscreen mode. This
+ // has something to do with how we move the main window while it's hidden;
+ // if we don't hide the main window below, we don't get this problem.
+ omnibox_win->set_force_hidden(true);
+ ShowWindow(omnibox_win->m_hWnd, SW_HIDE);
+ }
#endif
}
#if defined(OS_WIN) && !defined(USE_AURA)
@@ -2189,9 +2192,11 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
}
} else {
#if defined(OS_WIN) && !defined(USE_AURA)
- // Show the edit again since we're no longer in fullscreen mode.
- omnibox_view->set_force_hidden(false);
- ShowWindow(omnibox_view->m_hWnd, SW_SHOW);
+ if (omnibox_win) {
+ // Show the edit again since we're no longer in fullscreen mode.
+ omnibox_win->set_force_hidden(false);
+ ShowWindow(omnibox_win->m_hWnd, SW_SHOW);
+ }
#endif
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698