| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/apps/glass_app_window_frame_view_win.h" | 5 #include "chrome/browser/ui/views/apps/glass_app_window_frame_view_win.h" |
| 6 | 6 |
| 7 #include "apps/ui/native_app_window.h" | 7 #include "extensions/browser/app_window/native_app_window.h" |
| 8 #include "ui/base/hit_test.h" | 8 #include "ui/base/hit_test.h" |
| 9 #include "ui/gfx/win/dpi.h" | 9 #include "ui/gfx/win/dpi.h" |
| 10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
| 11 #include "ui/views/widget/widget_delegate.h" | 11 #include "ui/views/widget/widget_delegate.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 const int kResizeAreaCornerSize = 16; | 15 const int kResizeAreaCornerSize = 16; |
| 16 | 16 |
| 17 } // namespace | 17 } // namespace |
| 18 | 18 |
| 19 const char GlassAppWindowFrameViewWin::kViewClassName[] = | 19 const char GlassAppWindowFrameViewWin::kViewClassName[] = |
| 20 "ui/views/apps/GlassAppWindowFrameViewWin"; | 20 "ui/views/apps/GlassAppWindowFrameViewWin"; |
| 21 | 21 |
| 22 GlassAppWindowFrameViewWin::GlassAppWindowFrameViewWin( | 22 GlassAppWindowFrameViewWin::GlassAppWindowFrameViewWin( |
| 23 apps::NativeAppWindow* window, | 23 extensions::NativeAppWindow* window, |
| 24 views::Widget* widget) | 24 views::Widget* widget) |
| 25 : window_(window), widget_(widget) { | 25 : window_(window), widget_(widget) { |
| 26 } | 26 } |
| 27 | 27 |
| 28 GlassAppWindowFrameViewWin::~GlassAppWindowFrameViewWin() { | 28 GlassAppWindowFrameViewWin::~GlassAppWindowFrameViewWin() { |
| 29 } | 29 } |
| 30 | 30 |
| 31 gfx::Insets GlassAppWindowFrameViewWin::GetGlassInsets() const { | 31 gfx::Insets GlassAppWindowFrameViewWin::GetGlassInsets() const { |
| 32 // If 1 is not subtracted, they are too big. There is possibly some reason | 32 // If 1 is not subtracted, they are too big. There is possibly some reason |
| 33 // for that. | 33 // for that. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 // Add to the client maximum size the height of any title bar and borders. | 131 // Add to the client maximum size the height of any title bar and borders. |
| 132 gfx::Size client_size = GetBoundsForClientView().size(); | 132 gfx::Size client_size = GetBoundsForClientView().size(); |
| 133 if (max_size.width()) | 133 if (max_size.width()) |
| 134 max_size.Enlarge(width() - client_size.width(), 0); | 134 max_size.Enlarge(width() - client_size.width(), 0); |
| 135 if (max_size.height()) | 135 if (max_size.height()) |
| 136 max_size.Enlarge(0, height() - client_size.height()); | 136 max_size.Enlarge(0, height() - client_size.height()); |
| 137 | 137 |
| 138 return max_size; | 138 return max_size; |
| 139 } | 139 } |
| OLD | NEW |