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

Side by Side Diff: components/native_app_window/size_constraints.h

Issue 616253002: Extract NativeAppWindow from src/extensions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: might fix athena. similarity=33 Created 6 years, 2 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
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 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_SIZE_CONSTRAINTS_H_ 5 #ifndef COMPONENTS_NATIVE_APP_WINDOW_SIZE_CONSTRAINTS_H_
6 #define EXTENSIONS_BROWSER_APP_WINDOW_SIZE_CONSTRAINTS_H_ 6 #define COMPONENTS_NATIVE_APP_WINDOW_SIZE_CONSTRAINTS_H_
7 7
8 #include "components/native_app_window/native_app_window_export.h"
8 #include "ui/gfx/geometry/size.h" 9 #include "ui/gfx/geometry/size.h"
9 10
10 namespace gfx { 11 namespace gfx {
11 class Insets; 12 class Insets;
12 } 13 }
13 14
14 namespace extensions { 15 namespace native_app_window {
15 16
16 class SizeConstraints { 17 class NATIVE_APP_WINDOW_EXPORT SizeConstraints {
17 public: 18 public:
18 // The value SizeConstraints uses to represent an unbounded width or height. 19 // The value SizeConstraints uses to represent an unbounded width or height.
19 // This is an enum so that it can be declared inline here. 20 // This is an enum so that it can be declared inline here.
20 enum { kUnboundedSize = 0 }; 21 enum { kUnboundedSize = 0 };
21 22
22 SizeConstraints(); 23 SizeConstraints();
23 SizeConstraints(const gfx::Size& min_size, const gfx::Size& max_size); 24 SizeConstraints(const gfx::Size& min_size, const gfx::Size& max_size);
24 ~SizeConstraints(); 25 ~SizeConstraints();
25 26
26 // Adds frame insets to a size constraint. 27 // Adds frame insets to a size constraint.
(...skipping 18 matching lines...) Expand all
45 gfx::Size GetMinimumSize() const; 46 gfx::Size GetMinimumSize() const;
46 47
47 void set_minimum_size(const gfx::Size& min_size); 48 void set_minimum_size(const gfx::Size& min_size);
48 void set_maximum_size(const gfx::Size& max_size); 49 void set_maximum_size(const gfx::Size& max_size);
49 50
50 private: 51 private:
51 gfx::Size minimum_size_; 52 gfx::Size minimum_size_;
52 gfx::Size maximum_size_; 53 gfx::Size maximum_size_;
53 }; 54 };
54 55
55 } // namespace extensions 56 } // namespace native_app_window
56 57
57 #endif // EXTENSIONS_BROWSER_APP_WINDOW_SIZE_CONSTRAINTS_H_ 58 #endif // COMPONENTS_NATIVE_APP_WINDOW_SIZE_CONSTRAINTS_H_
OLDNEW
« no previous file with comments | « components/native_app_window/native_app_window_views.cc ('k') | components/native_app_window/size_constraints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698