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

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

Issue 28129: Update animations in fullscreen mode to prevent stuck throbbers.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « chrome/browser/views/frame/browser_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 10359)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -406,22 +406,6 @@
}
}
-bool BrowserView::SupportsWindowFeature(WindowFeature feature) const {
- const Browser::Type type = browser_->type();
- unsigned int features = FEATURE_INFOBAR | FEATURE_DOWNLOADSHELF;
- if (type == Browser::TYPE_NORMAL)
- features |= FEATURE_BOOKMARKBAR;
- if (!fullscreen_) {
- if (type == Browser::TYPE_NORMAL)
- features |= FEATURE_TABSTRIP | FEATURE_TOOLBAR;
- else
- features |= FEATURE_TITLEBAR;
- if (type != Browser::TYPE_APP)
- features |= FEATURE_LOCATIONBAR;
- }
- return !!(features & feature);
-}
-
// static
void BrowserView::RegisterBrowserViewPrefs(PrefService* prefs) {
prefs->RegisterIntegerPref(prefs::kPluginMessageResponseTimeout,
@@ -623,7 +607,7 @@
HWND hwnd = widget->GetHWND();
if (fullscreen_) {
// Save current window information. We force the window into restored mode
- // before going fuillscreen because Windows doesn't seem to hide the
+ // before going fullscreen because Windows doesn't seem to hide the
// taskbar if the window is in the maximized state.
saved_window_info_.maximized = IsMaximized();
if (saved_window_info_.maximized)
@@ -1026,8 +1010,7 @@
// - the size of the content area (inner size).
// We need to use these values to determine the appropriate size and
// position of the resulting window.
- if (SupportsWindowFeature(FEATURE_TOOLBAR) ||
- SupportsWindowFeature(FEATURE_LOCATIONBAR)) {
+ if (IsToolbarVisible()) {
// If we're showing the toolbar, we need to adjust |*bounds| to include
// its desired height, since the toolbar is considered part of the
// window's client area as far as GetWindowBoundsForClientBounds is
@@ -1289,6 +1272,22 @@
}
}
+bool BrowserView::SupportsWindowFeature(WindowFeature feature) const {
+ const Browser::Type type = browser_->type();
+ unsigned int features = FEATURE_INFOBAR | FEATURE_DOWNLOADSHELF;
+ if (type == Browser::TYPE_NORMAL)
+ features |= FEATURE_BOOKMARKBAR;
+ if (!fullscreen_) {
+ if (type == Browser::TYPE_NORMAL)
+ features |= FEATURE_TABSTRIP | FEATURE_TOOLBAR;
+ else
+ features |= FEATURE_TITLEBAR;
+ if (type != Browser::TYPE_APP)
+ features |= FEATURE_LOCATIONBAR;
+ }
+ return !!(features & feature);
+}
+
bool BrowserView::ShouldForwardToTabStrip(
const views::DropTargetEvent& event) {
if (!tabstrip_->IsVisible())
@@ -1609,8 +1608,12 @@
}
void BrowserView::LoadingAnimationCallback() {
- if (SupportsWindowFeature(FEATURE_TABSTRIP)) {
- // Loading animations are shown in the tab for tabbed windows.
+ if (browser_->type() == Browser::TYPE_NORMAL) {
+ // Loading animations are shown in the tab for tabbed windows. We check the
+ // browser type instead of calling IsTabStripVisible() because the latter
+ // will return false for fullscreen windows, but we still need to update
+ // their animations (so that when they come out of fullscreen mode they'll
+ // be correct).
tabstrip_->UpdateLoadingAnimations();
} else if (ShouldShowWindowIcon()) {
// ... or in the window icon area for popups and app windows.
« no previous file with comments | « chrome/browser/views/frame/browser_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698