OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/views/frame/browser_frame.h" | 7 #include "chrome/browser/views/frame/browser_frame.h" |
8 #include "chrome/browser/views/frame/browser_view.h" | 8 #include "chrome/browser/views/frame/browser_view.h" |
9 #include "chrome/browser/views/tabs/tab_strip.h" | 9 #include "chrome/browser/views/tabs/tab_strip.h" |
10 #include "chrome/common/gfx/chrome_canvas.h" | 10 #include "chrome/common/gfx/chrome_canvas.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 const gfx::Rect& client_bounds) const { | 453 const gfx::Rect& client_bounds) const { |
454 int top_height = NonClientTopBorderHeight(); | 454 int top_height = NonClientTopBorderHeight(); |
455 int border_thickness = NonClientBorderThickness(); | 455 int border_thickness = NonClientBorderThickness(); |
456 return gfx::Rect(std::max(0, client_bounds.x() - border_thickness), | 456 return gfx::Rect(std::max(0, client_bounds.x() - border_thickness), |
457 std::max(0, client_bounds.y() - top_height), | 457 std::max(0, client_bounds.y() - top_height), |
458 client_bounds.width() + (2 * border_thickness), | 458 client_bounds.width() + (2 * border_thickness), |
459 client_bounds.height() + top_height + border_thickness); | 459 client_bounds.height() + top_height + border_thickness); |
460 } | 460 } |
461 | 461 |
462 gfx::Point OpaqueBrowserFrameView::GetSystemMenuPoint() const { | 462 gfx::Point OpaqueBrowserFrameView::GetSystemMenuPoint() const { |
463 gfx::Point system_menu_point(FrameBorderThickness(), | 463 gfx::Point system_menu_point( |
| 464 MirroredXCoordinateInsideView(FrameBorderThickness()), |
464 NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() - | 465 NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() - |
465 (browser_view_->IsFullscreen() ? 0 : kClientEdgeThickness)); | 466 (browser_view_->IsFullscreen() ? 0 : kClientEdgeThickness)); |
466 ConvertPointToScreen(this, &system_menu_point); | 467 ConvertPointToScreen(this, &system_menu_point); |
467 return system_menu_point; | 468 return system_menu_point; |
468 } | 469 } |
469 | 470 |
470 int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) { | 471 int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) { |
471 if (!bounds().Contains(point)) | 472 if (!bounds().Contains(point)) |
472 return HTNOWHERE; | 473 return HTNOWHERE; |
473 | 474 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 } | 1053 } |
1053 | 1054 |
1054 // static | 1055 // static |
1055 void OpaqueBrowserFrameView::InitAppWindowResources() { | 1056 void OpaqueBrowserFrameView::InitAppWindowResources() { |
1056 static bool initialized = false; | 1057 static bool initialized = false; |
1057 if (!initialized) { | 1058 if (!initialized) { |
1058 title_font_ = win_util::GetWindowTitleFont(); | 1059 title_font_ = win_util::GetWindowTitleFont(); |
1059 initialized = true; | 1060 initialized = true; |
1060 } | 1061 } |
1061 } | 1062 } |
OLD | NEW |