| OLD | NEW |
| 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 y - GetTopInset(false) - GetLayoutInsets(TAB).top(), x, | 690 y - GetTopInset(false) - GetLayoutInsets(TAB).top(), x, |
| 691 y, w, toolbar_bounds.height()); | 691 y, w, toolbar_bounds.height()); |
| 692 } else { | 692 } else { |
| 693 canvas->FillRect(toolbar_bounds, | 693 canvas->FillRect(toolbar_bounds, |
| 694 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); | 694 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); |
| 695 } | 695 } |
| 696 | 696 |
| 697 // Top stroke. | 697 // Top stroke. |
| 698 gfx::Rect separator_rect(x, y, w, 0); | 698 gfx::Rect separator_rect(x, y, w, 0); |
| 699 gfx::ScopedCanvas scoped_canvas(canvas); | 699 gfx::ScopedCanvas scoped_canvas(canvas); |
| 700 gfx::Rect tabstrip_bounds(GetBoundsForTabStrip(browser_view()->tabstrip())); | 700 gfx::Rect tabstrip_bounds = |
| 701 tabstrip_bounds.set_x(GetMirroredXForRect(tabstrip_bounds)); | 701 GetMirroredRect(GetBoundsForTabStrip(browser_view()->tabstrip())); |
| 702 canvas->sk_canvas()->clipRect(gfx::RectToSkRect(tabstrip_bounds), | 702 canvas->sk_canvas()->clipRect(gfx::RectToSkRect(tabstrip_bounds), |
| 703 SkClipOp::kDifference); | 703 SkClipOp::kDifference); |
| 704 separator_rect.set_y(tabstrip_bounds.bottom()); | 704 separator_rect.set_y(tabstrip_bounds.bottom()); |
| 705 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), | 705 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), |
| 706 separator_rect, true); | 706 separator_rect, true); |
| 707 | 707 |
| 708 // Toolbar/content separator. | 708 // Toolbar/content separator. |
| 709 BrowserView::Paint1pxHorizontalLine( | 709 BrowserView::Paint1pxHorizontalLine( |
| 710 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), | 710 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), |
| 711 toolbar_bounds, true); | 711 toolbar_bounds, true); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 static bool initialized = false; | 966 static bool initialized = false; |
| 967 if (!initialized) { | 967 if (!initialized) { |
| 968 for (int i = 0; i < kThrobberIconCount; ++i) { | 968 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 969 throbber_icons_[i] = | 969 throbber_icons_[i] = |
| 970 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 970 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
| 971 DCHECK(throbber_icons_[i]); | 971 DCHECK(throbber_icons_[i]); |
| 972 } | 972 } |
| 973 initialized = true; | 973 initialized = true; |
| 974 } | 974 } |
| 975 } | 975 } |
| OLD | NEW |