| 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 "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "base/win/windows_version.h" | 8 #include "base/win/windows_version.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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 const ui::ThemeProvider* tp = GetThemeProvider(); | 443 const ui::ThemeProvider* tp = GetThemeProvider(); |
| 444 const SkColor toolbar_color = | 444 const SkColor toolbar_color = |
| 445 normal_mode | 445 normal_mode |
| 446 ? tp->GetColor(ThemeProperties::COLOR_TOOLBAR) | 446 ? tp->GetColor(ThemeProperties::COLOR_TOOLBAR) |
| 447 : ThemeProperties::GetDefaultColor(ThemeProperties::COLOR_TOOLBAR, | 447 : ThemeProperties::GetDefaultColor(ThemeProperties::COLOR_TOOLBAR, |
| 448 browser_view()->IsOffTheRecord()); | 448 browser_view()->IsOffTheRecord()); |
| 449 | 449 |
| 450 const gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds()); | 450 const gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds()); |
| 451 if (!normal_mode) { | 451 if (!normal_mode) { |
| 452 // The toolbar isn't going to draw a top edge for us, so draw one ourselves. | 452 // The toolbar isn't going to draw a top edge for us, so draw one ourselves. |
| 453 if (IsToolbarVisible()) | 453 client_bounds.Offset(0, toolbar_bounds.y()); |
| 454 y += toolbar_bounds.y() + kClientEdgeThickness; | 454 client_bounds.Inset(-kClientEdgeThickness, 0, -kClientEdgeThickness, |
| 455 client_bounds.set_y(y); | 455 client_bounds.height() - kClientEdgeThickness); |
| 456 client_bounds.Inset(-kClientEdgeThickness, -kClientEdgeThickness, | |
| 457 -kClientEdgeThickness, client_bounds.height()); | |
| 458 canvas->FillRect(client_bounds, toolbar_color); | 456 canvas->FillRect(client_bounds, toolbar_color); |
| 459 | 457 |
| 460 // Popup and app windows don't custom-draw any other edges, so we're done. | 458 // Popup and app windows don't custom-draw any other edges, so we're done. |
| 461 return; | 459 return; |
| 462 } | 460 } |
| 463 | 461 |
| 464 // In maximized mode, the only edge to draw is the top one, so we're done. | 462 // In maximized mode, the only edge to draw is the top one, so we're done. |
| 465 if (frame()->IsMaximized()) | 463 if (frame()->IsMaximized()) |
| 466 return; | 464 return; |
| 467 | 465 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 static bool initialized = false; | 679 static bool initialized = false; |
| 682 if (!initialized) { | 680 if (!initialized) { |
| 683 for (int i = 0; i < kThrobberIconCount; ++i) { | 681 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 684 throbber_icons_[i] = | 682 throbber_icons_[i] = |
| 685 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 683 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
| 686 DCHECK(throbber_icons_[i]); | 684 DCHECK(throbber_icons_[i]); |
| 687 } | 685 } |
| 688 initialized = true; | 686 initialized = true; |
| 689 } | 687 } |
| 690 } | 688 } |
| OLD | NEW |