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 "extensions/browser/app_window/app_window.h" | 5 #include "extensions/browser/app_window/app_window.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 bounds_properties->SetInteger("width", bounds.width()); | 95 bounds_properties->SetInteger("width", bounds.width()); |
96 bounds_properties->SetInteger("height", bounds.height()); | 96 bounds_properties->SetInteger("height", bounds.height()); |
97 | 97 |
98 SetConstraintProperty("minWidth", min_size.width(), bounds_properties.get()); | 98 SetConstraintProperty("minWidth", min_size.width(), bounds_properties.get()); |
99 SetConstraintProperty( | 99 SetConstraintProperty( |
100 "minHeight", min_size.height(), bounds_properties.get()); | 100 "minHeight", min_size.height(), bounds_properties.get()); |
101 SetConstraintProperty("maxWidth", max_size.width(), bounds_properties.get()); | 101 SetConstraintProperty("maxWidth", max_size.width(), bounds_properties.get()); |
102 SetConstraintProperty( | 102 SetConstraintProperty( |
103 "maxHeight", max_size.height(), bounds_properties.get()); | 103 "maxHeight", max_size.height(), bounds_properties.get()); |
104 | 104 |
105 window_properties->Set(bounds_name, bounds_properties.release()); | 105 window_properties->Set(bounds_name, std::move(bounds_properties)); |
106 } | 106 } |
107 | 107 |
108 // Combines the constraints of the content and window, and returns constraints | 108 // Combines the constraints of the content and window, and returns constraints |
109 // for the window. | 109 // for the window. |
110 gfx::Size GetCombinedWindowConstraints(const gfx::Size& window_constraints, | 110 gfx::Size GetCombinedWindowConstraints(const gfx::Size& window_constraints, |
111 const gfx::Size& content_constraints, | 111 const gfx::Size& content_constraints, |
112 const gfx::Insets& frame_insets) { | 112 const gfx::Insets& frame_insets) { |
113 gfx::Size combined_constraints(window_constraints); | 113 gfx::Size combined_constraints(window_constraints); |
114 if (content_constraints.width() > 0) { | 114 if (content_constraints.width() > 0) { |
115 combined_constraints.set_width( | 115 combined_constraints.set_width( |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 region.bounds.x(), | 1041 region.bounds.x(), |
1042 region.bounds.y(), | 1042 region.bounds.y(), |
1043 region.bounds.right(), | 1043 region.bounds.right(), |
1044 region.bounds.bottom(), | 1044 region.bounds.bottom(), |
1045 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1045 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
1046 } | 1046 } |
1047 return sk_region; | 1047 return sk_region; |
1048 } | 1048 } |
1049 | 1049 |
1050 } // namespace extensions | 1050 } // namespace extensions |
OLD | NEW |