Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: chrome/browser/ui/views/apps/glass_app_window_frame_view_win.cc

Issue 479933003: Move NativeAppWindow to extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698