| 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_non_client_view.h" | 5 #include "chrome/browser/views/frame/opaque_non_client_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/views/frame/browser_view.h" | 7 #include "chrome/browser/views/frame/browser_view.h" |
| 8 #include "chrome/browser/views/tabs/tab_strip.h" | 8 #include "chrome/browser/views/tabs/tab_strip.h" |
| 9 #include "chrome/common/gfx/chrome_font.h" | 9 #include "chrome/common/gfx/chrome_font.h" |
| 10 #include "chrome/common/gfx/path.h" | 10 #include "chrome/common/gfx/path.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 int height) const { | 474 int height) const { |
| 475 int border_thickness = NonClientBorderThickness(); | 475 int border_thickness = NonClientBorderThickness(); |
| 476 return gfx::Size(width + (2 * border_thickness), | 476 return gfx::Size(width + (2 * border_thickness), |
| 477 height + NonClientTopBorderHeight() + border_thickness); | 477 height + NonClientTopBorderHeight() + border_thickness); |
| 478 } | 478 } |
| 479 | 479 |
| 480 gfx::Point OpaqueNonClientView::GetSystemMenuPoint() const { | 480 gfx::Point OpaqueNonClientView::GetSystemMenuPoint() const { |
| 481 int tabstrip_height = browser_view_->IsTabStripVisible() ? | 481 int tabstrip_height = browser_view_->IsTabStripVisible() ? |
| 482 browser_view_->GetTabStripHeight() : 0; | 482 browser_view_->GetTabStripHeight() : 0; |
| 483 gfx::Point system_menu_point(FrameBorderThickness(), | 483 gfx::Point system_menu_point(FrameBorderThickness(), |
| 484 NonClientTopBorderHeight() + tabstrip_height - | 484 NonClientTopBorderHeight() + tabstrip_height - kClientEdgeThickness); |
| 485 BottomEdgeThicknessWithinNonClientHeight()); | |
| 486 ConvertPointToScreen(this, &system_menu_point); | 485 ConvertPointToScreen(this, &system_menu_point); |
| 487 return system_menu_point; | 486 return system_menu_point; |
| 488 } | 487 } |
| 489 | 488 |
| 490 int OpaqueNonClientView::NonClientHitTest(const gfx::Point& point) { | 489 int OpaqueNonClientView::NonClientHitTest(const gfx::Point& point) { |
| 491 if (!bounds().Contains(point)) | 490 if (!bounds().Contains(point)) |
| 492 return HTNOWHERE; | 491 return HTNOWHERE; |
| 493 | 492 |
| 494 int frame_component = frame_->client_view()->NonClientHitTest(point); | 493 int frame_component = frame_->client_view()->NonClientHitTest(point); |
| 495 if (frame_component != HTNOWHERE) | 494 if (frame_component != HTNOWHERE) |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 } | 1065 } |
| 1067 | 1066 |
| 1068 // static | 1067 // static |
| 1069 void OpaqueNonClientView::InitAppWindowResources() { | 1068 void OpaqueNonClientView::InitAppWindowResources() { |
| 1070 static bool initialized = false; | 1069 static bool initialized = false; |
| 1071 if (!initialized) { | 1070 if (!initialized) { |
| 1072 title_font_ = win_util::GetWindowTitleFont(); | 1071 title_font_ = win_util::GetWindowTitleFont(); |
| 1073 initialized = true; | 1072 initialized = true; |
| 1074 } | 1073 } |
| 1075 } | 1074 } |
| OLD | NEW |