OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/frame/opaque_browser_frame_view.h" | 5 #include "chrome/browser/views/frame/opaque_browser_frame_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "app/theme_provider.h" | 9 #include "app/theme_provider.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 canvas->DrawBitmapInt(*toolbar_right, 0, 0, toolbar_right->width(), | 841 canvas->DrawBitmapInt(*toolbar_right, 0, 0, toolbar_right->width(), |
842 split_point, right_x, y, | 842 split_point, right_x, y, |
843 toolbar_right->width(), split_point, false); | 843 toolbar_right->width(), split_point, false); |
844 canvas->DrawBitmapInt(*toolbar_right, 0, | 844 canvas->DrawBitmapInt(*toolbar_right, 0, |
845 toolbar_right->height() - bottom_edge_height, toolbar_right->width(), | 845 toolbar_right->height() - bottom_edge_height, toolbar_right->width(), |
846 bottom_edge_height, right_x, bottom_y, | 846 bottom_edge_height, right_x, bottom_y, |
847 toolbar_right->width(), bottom_edge_height, false); | 847 toolbar_right->width(), bottom_edge_height, false); |
848 | 848 |
849 // Draw the content/toolbar separator. | 849 // Draw the content/toolbar separator. |
850 canvas->DrawLineInt(ResourceBundle::toolbar_separator_color, | 850 canvas->DrawLineInt(ResourceBundle::toolbar_separator_color, |
851 MirroredLeftPointForRect(toolbar_bounds), | 851 toolbar_bounds.x(), |
852 toolbar_bounds.bottom() - kClientEdgeThickness, | 852 toolbar_bounds.bottom() - kClientEdgeThickness, |
853 toolbar_bounds.width() - kClientEdgeThickness, | 853 toolbar_bounds.right(), |
854 toolbar_bounds.bottom() - kClientEdgeThickness); | 854 toolbar_bounds.bottom() - kClientEdgeThickness); |
855 } | 855 } |
856 | 856 |
857 void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) { | 857 void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) { |
858 ThemeProvider* tp = GetThemeProvider(); | 858 ThemeProvider* tp = GetThemeProvider(); |
859 int client_area_top = frame_->GetWindow()->GetClientView()->y(); | 859 int client_area_top = frame_->GetWindow()->GetClientView()->y(); |
860 | 860 |
861 gfx::Rect client_area_bounds = CalculateClientAreaBounds(width(), height()); | 861 gfx::Rect client_area_bounds = CalculateClientAreaBounds(width(), height()); |
862 SkColor toolbar_color = tp->GetColor(BrowserThemeProvider::COLOR_TOOLBAR); | 862 SkColor toolbar_color = tp->GetColor(BrowserThemeProvider::COLOR_TOOLBAR); |
863 | 863 |
864 if (browser_view_->IsToolbarVisible()) { | 864 if (browser_view_->IsToolbarVisible()) { |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 // static | 1071 // static |
1072 gfx::Rect OpaqueBrowserFrameView::GetViewBounds(views::View* src, | 1072 gfx::Rect OpaqueBrowserFrameView::GetViewBounds(views::View* src, |
1073 views::View* dst) { | 1073 views::View* dst) { |
1074 gfx::Rect bounds(src->bounds()); | 1074 gfx::Rect bounds(src->bounds()); |
1075 | 1075 |
1076 gfx::Point origin_in_dst(bounds.origin()); | 1076 gfx::Point origin_in_dst(bounds.origin()); |
1077 View::ConvertPointToView(src->GetParent(), dst, &origin_in_dst); | 1077 View::ConvertPointToView(src->GetParent(), dst, &origin_in_dst); |
1078 bounds.set_origin(origin_in_dst); | 1078 bounds.set_origin(origin_in_dst); |
1079 return bounds; | 1079 return bounds; |
1080 } | 1080 } |
OLD | NEW |