| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser_non_client_frame_view_mac.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h" |
| 6 | 6 |
| 7 #include "chrome/browser/themes/theme_properties.h" | 7 #include "chrome/browser/themes/theme_properties.h" |
| 8 #include "chrome/browser/ui/layout_constants.h" | 8 #include "chrome/browser/ui/layout_constants.h" |
| 9 #include "chrome/browser/ui/views/frame/browser_frame.h" | 9 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 canvas->DrawColor(GetFrameColor()); | 115 canvas->DrawColor(GetFrameColor()); |
| 116 | 116 |
| 117 if (!GetThemeProvider()->UsingSystemTheme()) | 117 if (!GetThemeProvider()->UsingSystemTheme()) |
| 118 PaintThemedFrame(canvas); | 118 PaintThemedFrame(canvas); |
| 119 | 119 |
| 120 if (browser_view()->IsToolbarVisible()) | 120 if (browser_view()->IsToolbarVisible()) |
| 121 PaintToolbarBackground(canvas); | 121 PaintToolbarBackground(canvas); |
| 122 } | 122 } |
| 123 | 123 |
| 124 // BrowserNonClientFrameView: | 124 // BrowserNonClientFrameView: |
| 125 void BrowserNonClientFrameViewMac::UpdateAvatar() { | 125 void BrowserNonClientFrameViewMac::UpdateProfileIcons() { |
| 126 NOTIMPLEMENTED(); | 126 NOTIMPLEMENTED(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 /////////////////////////////////////////////////////////////////////////////// | 129 /////////////////////////////////////////////////////////////////////////////// |
| 130 // BrowserNonClientFrameViewMac, private: | 130 // BrowserNonClientFrameViewMac, private: |
| 131 | 131 |
| 132 void BrowserNonClientFrameViewMac::PaintThemedFrame(gfx::Canvas* canvas) { | 132 void BrowserNonClientFrameViewMac::PaintThemedFrame(gfx::Canvas* canvas) { |
| 133 gfx::ImageSkia image = GetFrameImage(); | 133 gfx::ImageSkia image = GetFrameImage(); |
| 134 canvas->TileImageInt(image, 0, 0, width(), image.height()); | 134 canvas->TileImageInt(image, 0, 0, width(), image.height()); |
| 135 gfx::ImageSkia overlay = GetFrameOverlayImage(); | 135 gfx::ImageSkia overlay = GetFrameOverlayImage(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 165 // Draw the tabstrip/toolbar separator. | 165 // Draw the tabstrip/toolbar separator. |
| 166 canvas->TileImageInt(*border, 0, 0, x, y, w, border->height()); | 166 canvas->TileImageInt(*border, 0, 0, x, y, w, border->height()); |
| 167 | 167 |
| 168 // Draw the content/toolbar separator. | 168 // Draw the content/toolbar separator. |
| 169 canvas->FillRect( | 169 canvas->FillRect( |
| 170 gfx::Rect(x, y + h - kClientEdgeThickness, w, kClientEdgeThickness), | 170 gfx::Rect(x, y + h - kClientEdgeThickness, w, kClientEdgeThickness), |
| 171 ThemeProperties::GetDefaultColor( | 171 ThemeProperties::GetDefaultColor( |
| 172 ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR, | 172 ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR, |
| 173 browser_view()->IsOffTheRecord())); | 173 browser_view()->IsOffTheRecord())); |
| 174 } | 174 } |
| OLD | NEW |