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/opaque_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 424 |
425 int OpaqueBrowserFrameView::GetTabStripHeight() const { | 425 int OpaqueBrowserFrameView::GetTabStripHeight() const { |
426 return browser_view()->GetTabStripHeight(); | 426 return browser_view()->GetTabStripHeight(); |
427 } | 427 } |
428 | 428 |
429 gfx::Size OpaqueBrowserFrameView::GetTabstripPreferredSize() const { | 429 gfx::Size OpaqueBrowserFrameView::GetTabstripPreferredSize() const { |
430 gfx::Size s = browser_view()->tabstrip()->GetPreferredSize(); | 430 gfx::Size s = browser_view()->tabstrip()->GetPreferredSize(); |
431 return s; | 431 return s; |
432 } | 432 } |
433 | 433 |
| 434 int OpaqueBrowserFrameView::GetToolbarLeadingCornerClientWidth() const { |
| 435 return browser_view()->GetToolbarBounds().x() - kContentEdgeShadowThickness + |
| 436 GetThemeProvider()->GetImageSkiaNamed( |
| 437 IDR_CONTENT_TOP_LEFT_CORNER)->width(); |
| 438 } |
| 439 |
434 /////////////////////////////////////////////////////////////////////////////// | 440 /////////////////////////////////////////////////////////////////////////////// |
435 // OpaqueBrowserFrameView, protected: | 441 // OpaqueBrowserFrameView, protected: |
436 | 442 |
437 // views::View: | 443 // views::View: |
438 void OpaqueBrowserFrameView::OnPaint(gfx::Canvas* canvas) { | 444 void OpaqueBrowserFrameView::OnPaint(gfx::Canvas* canvas) { |
439 if (frame()->IsFullscreen()) | 445 if (frame()->IsFullscreen()) |
440 return; // Nothing is visible, so don't bother to paint. | 446 return; // Nothing is visible, so don't bother to paint. |
441 | 447 |
442 if (layout_->IsTitleBarCondensed()) | 448 if (layout_->IsTitleBarCondensed()) |
443 PaintMaximizedFrameBorder(canvas); | 449 PaintMaximizedFrameBorder(canvas); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 SkColor color, | 820 SkColor color, |
815 gfx::Canvas* canvas) const { | 821 gfx::Canvas* canvas) const { |
816 gfx::Rect side(x - kClientEdgeThickness, y, kClientEdgeThickness, | 822 gfx::Rect side(x - kClientEdgeThickness, y, kClientEdgeThickness, |
817 bottom + kClientEdgeThickness - y); | 823 bottom + kClientEdgeThickness - y); |
818 canvas->FillRect(side, color); | 824 canvas->FillRect(side, color); |
819 canvas->FillRect(gfx::Rect(x, bottom, right - x, kClientEdgeThickness), | 825 canvas->FillRect(gfx::Rect(x, bottom, right - x, kClientEdgeThickness), |
820 color); | 826 color); |
821 side.set_x(right); | 827 side.set_x(right); |
822 canvas->FillRect(side, color); | 828 canvas->FillRect(side, color); |
823 } | 829 } |
OLD | NEW |