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

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

Issue 2247563002: Change status bubble rendering at hidpi and when there is no client edge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments and nits Created 4 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
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 <dwmapi.h> 7 #include <dwmapi.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 profile_indicator_icon()->GetMirroredBounds().Intersects(rect); 331 profile_indicator_icon()->GetMirroredBounds().Intersects(rect);
332 bool hit_profile_switcher_button = 332 bool hit_profile_switcher_button =
333 profile_switcher_.view() && 333 profile_switcher_.view() &&
334 profile_switcher_.view()->GetMirroredBounds().Intersects(rect); 334 profile_switcher_.view()->GetMirroredBounds().Intersects(rect);
335 return hit_incognito_icon || hit_profile_switcher_button || 335 return hit_incognito_icon || hit_profile_switcher_button ||
336 !frame()->client_view()->bounds().Intersects(rect); 336 !frame()->client_view()->bounds().Intersects(rect);
337 } 337 }
338 338
339 int GlassBrowserFrameView::ClientBorderThickness(bool restored) const { 339 int GlassBrowserFrameView::ClientBorderThickness(bool restored) const {
340 // The frame ends abruptly at the 1 pixel window border drawn by Windows 10. 340 // The frame ends abruptly at the 1 pixel window border drawn by Windows 10.
341 if (base::win::GetVersion() >= base::win::VERSION_WIN10) 341 if (!browser_view()->HasClientEdge())
342 return 0; 342 return 0;
343 343
344 if ((frame()->IsMaximized() || frame()->IsFullscreen()) && !restored) 344 if ((frame()->IsMaximized() || frame()->IsFullscreen()) && !restored)
345 return 0; 345 return 0;
346 346
347 return kClientBorderThickness; 347 return kClientBorderThickness;
348 } 348 }
349 349
350 int GlassBrowserFrameView::FrameBorderThickness() const { 350 int GlassBrowserFrameView::FrameBorderThickness() const {
351 return (frame()->IsMaximized() || frame()->IsFullscreen()) ? 351 return (frame()->IsMaximized() || frame()->IsFullscreen()) ?
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 static bool initialized = false; 728 static bool initialized = false;
729 if (!initialized) { 729 if (!initialized) {
730 for (int i = 0; i < kThrobberIconCount; ++i) { 730 for (int i = 0; i < kThrobberIconCount; ++i) {
731 throbber_icons_[i] = 731 throbber_icons_[i] =
732 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); 732 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i);
733 DCHECK(throbber_icons_[i]); 733 DCHECK(throbber_icons_[i]);
734 } 734 }
735 initialized = true; 735 initialized = true;
736 } 736 }
737 } 737 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698