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

Side by Side Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.cc

Issue 10919223: Ensure that the tabstrip is drawn at the top of the caption in Windows 8 metro mode if we are launc… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (frame()->IsMaximized() || frame()->IsFullscreen()) 260 if (frame()->IsMaximized() || frame()->IsFullscreen())
261 return 0; 261 return 0;
262 262
263 return kNonClientBorderThickness; 263 return kNonClientBorderThickness;
264 } 264 }
265 265
266 int GlassBrowserFrameView::NonClientTopBorderHeight( 266 int GlassBrowserFrameView::NonClientTopBorderHeight(
267 bool restored) const { 267 bool restored) const {
268 if (!restored && frame()->IsFullscreen()) 268 if (!restored && frame()->IsFullscreen())
269 return 0; 269 return 0;
270
270 // We'd like to use FrameBorderThickness() here, but the maximized Aero glass 271 // We'd like to use FrameBorderThickness() here, but the maximized Aero glass
271 // frame has a 0 frame border around most edges and a CYSIZEFRAME-thick border 272 // frame has a 0 frame border around most edges and a CYSIZEFRAME-thick border
272 // at the top (see AeroGlassFrame::OnGetMinMaxInfo()). 273 // at the top (see AeroGlassFrame::OnGetMinMaxInfo()).
273 return GetSystemMetrics(SM_CYSIZEFRAME) + 274 return GetSystemMetrics(SM_CYSIZEFRAME) +
274 ((!restored && browser_view()->IsMaximized()) ? 275 ((!restored && !frame()->ShouldLeaveOffsetNearTopBorder()) ?
275 -kTabstripTopShadowThickness : kNonClientRestoredExtraThickness); 276 -kTabstripTopShadowThickness : kNonClientRestoredExtraThickness);
276 } 277 }
277 278
278 void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) { 279 void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
279 ui::ThemeProvider* tp = GetThemeProvider(); 280 ui::ThemeProvider* tp = GetThemeProvider();
280 281
281 gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds()); 282 gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds());
282 gfx::Point toolbar_origin(toolbar_bounds.origin()); 283 gfx::Point toolbar_origin(toolbar_bounds.origin());
283 View::ConvertPointToTarget(browser_view(), this, &toolbar_origin); 284 View::ConvertPointToTarget(browser_view(), this, &toolbar_origin);
284 toolbar_bounds.set_origin(toolbar_origin); 285 toolbar_bounds.set_origin(toolbar_origin);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 static bool initialized = false; 521 static bool initialized = false;
521 if (!initialized) { 522 if (!initialized) {
522 for (int i = 0; i < kThrobberIconCount; ++i) { 523 for (int i = 0; i < kThrobberIconCount; ++i) {
523 throbber_icons_[i] = 524 throbber_icons_[i] =
524 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); 525 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i);
525 DCHECK(throbber_icons_[i]); 526 DCHECK(throbber_icons_[i]);
526 } 527 }
527 initialized = true; 528 initialized = true;
528 } 529 }
529 } 530 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698