| 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 canvas->DrawRect(gfx::RectF(0, 0, width() * scale, y), flags); | 608 canvas->DrawRect(gfx::RectF(0, 0, width() * scale, y), flags); |
| 609 | 609 |
| 610 const gfx::Rect titlebar_rect = gfx::ToEnclosingRect( | 610 const gfx::Rect titlebar_rect = gfx::ToEnclosingRect( |
| 611 gfx::RectF(0, y, width() * scale, tabstrip_bounds.bottom() * scale - y)); | 611 gfx::RectF(0, y, width() * scale, tabstrip_bounds.bottom() * scale - y)); |
| 612 // Paint the titlebar first so we have a background if an area isn't covered | 612 // Paint the titlebar first so we have a background if an area isn't covered |
| 613 // by the theme image. | 613 // by the theme image. |
| 614 flags.setColor(GetTitlebarColor()); | 614 flags.setColor(GetTitlebarColor()); |
| 615 canvas->DrawRect(titlebar_rect, flags); | 615 canvas->DrawRect(titlebar_rect, flags); |
| 616 const gfx::ImageSkia frame_image = GetFrameImage(); | 616 const gfx::ImageSkia frame_image = GetFrameImage(); |
| 617 if (!frame_image.isNull()) { | 617 if (!frame_image.isNull()) { |
| 618 canvas->TileImageInt(frame_image, 0, 0, scale, scale, titlebar_rect.x(), | 618 canvas->TileImageInt(frame_image, 0, 0, titlebar_rect.x(), |
| 619 titlebar_rect.y(), titlebar_rect.width(), | 619 titlebar_rect.y(), titlebar_rect.width(), |
| 620 titlebar_rect.height()); | 620 titlebar_rect.height(), scale); |
| 621 } | 621 } |
| 622 const gfx::ImageSkia frame_overlay_image = GetFrameOverlayImage(); | 622 const gfx::ImageSkia frame_overlay_image = GetFrameOverlayImage(); |
| 623 if (!frame_overlay_image.isNull()) { | 623 if (!frame_overlay_image.isNull()) { |
| 624 canvas->DrawImageInt(frame_overlay_image, 0, 0, frame_overlay_image.width(), | 624 canvas->DrawImageInt(frame_overlay_image, 0, 0, frame_overlay_image.width(), |
| 625 frame_overlay_image.height(), titlebar_rect.x(), | 625 frame_overlay_image.height(), titlebar_rect.x(), |
| 626 titlebar_rect.y(), frame_overlay_image.width() * scale, | 626 titlebar_rect.y(), frame_overlay_image.width() * scale, |
| 627 frame_overlay_image.height() * scale, true); | 627 frame_overlay_image.height() * scale, true); |
| 628 } | 628 } |
| 629 } | 629 } |
| 630 | 630 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 static bool initialized = false; | 915 static bool initialized = false; |
| 916 if (!initialized) { | 916 if (!initialized) { |
| 917 for (int i = 0; i < kThrobberIconCount; ++i) { | 917 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 918 throbber_icons_[i] = | 918 throbber_icons_[i] = |
| 919 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 919 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
| 920 DCHECK(throbber_icons_[i]); | 920 DCHECK(throbber_icons_[i]); |
| 921 } | 921 } |
| 922 initialized = true; | 922 initialized = true; |
| 923 } | 923 } |
| 924 } | 924 } |
| OLD | NEW |