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

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

Issue 2897533003: Change default ink drop center points to center of contents bounds (Closed)
Patch Set: fix compile Created 3 years, 7 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 y - GetTopInset(false) - GetLayoutInsets(TAB).top(), x, 675 y - GetTopInset(false) - GetLayoutInsets(TAB).top(), x,
676 y, w, toolbar_bounds.height()); 676 y, w, toolbar_bounds.height());
677 } else { 677 } else {
678 canvas->FillRect(toolbar_bounds, 678 canvas->FillRect(toolbar_bounds,
679 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); 679 tp->GetColor(ThemeProperties::COLOR_TOOLBAR));
680 } 680 }
681 681
682 // Top stroke. 682 // Top stroke.
683 gfx::Rect separator_rect(x, y, w, 0); 683 gfx::Rect separator_rect(x, y, w, 0);
684 gfx::ScopedCanvas scoped_canvas(canvas); 684 gfx::ScopedCanvas scoped_canvas(canvas);
685 gfx::Rect tabstrip_bounds(GetBoundsForTabStrip(browser_view()->tabstrip())); 685 gfx::Rect tabstrip_bounds =
686 tabstrip_bounds.set_x(GetMirroredXForRect(tabstrip_bounds)); 686 GetMirroredRect(GetBoundsForTabStrip(browser_view()->tabstrip()));
687 canvas->sk_canvas()->clipRect(gfx::RectToSkRect(tabstrip_bounds), 687 canvas->sk_canvas()->clipRect(gfx::RectToSkRect(tabstrip_bounds),
688 SkClipOp::kDifference); 688 SkClipOp::kDifference);
689 separator_rect.set_y(tabstrip_bounds.bottom()); 689 separator_rect.set_y(tabstrip_bounds.bottom());
690 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), 690 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(),
691 separator_rect, true); 691 separator_rect, true);
692 692
693 // Toolbar/content separator. 693 // Toolbar/content separator.
694 BrowserView::Paint1pxHorizontalLine( 694 BrowserView::Paint1pxHorizontalLine(
695 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), 695 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR),
696 toolbar_bounds, true); 696 toolbar_bounds, true);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 static bool initialized = false; 951 static bool initialized = false;
952 if (!initialized) { 952 if (!initialized) {
953 for (int i = 0; i < kThrobberIconCount; ++i) { 953 for (int i = 0; i < kThrobberIconCount; ++i) {
954 throbber_icons_[i] = 954 throbber_icons_[i] =
955 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); 955 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i);
956 DCHECK(throbber_icons_[i]); 956 DCHECK(throbber_icons_[i]);
957 } 957 }
958 initialized = true; 958 initialized = true;
959 } 959 }
960 } 960 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/contents_layout_manager.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