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

Side by Side Diff: extensions/browser/app_window/app_window.cc

Issue 2899743002: Remove raw base::DictionaryValue::Set in //extensions (Closed)
Patch Set: Rebase Created 3 years, 6 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 #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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 bounds_properties->SetInteger("width", bounds.width()); 97 bounds_properties->SetInteger("width", bounds.width());
98 bounds_properties->SetInteger("height", bounds.height()); 98 bounds_properties->SetInteger("height", bounds.height());
99 99
100 SetConstraintProperty("minWidth", min_size.width(), bounds_properties.get()); 100 SetConstraintProperty("minWidth", min_size.width(), bounds_properties.get());
101 SetConstraintProperty( 101 SetConstraintProperty(
102 "minHeight", min_size.height(), bounds_properties.get()); 102 "minHeight", min_size.height(), bounds_properties.get());
103 SetConstraintProperty("maxWidth", max_size.width(), bounds_properties.get()); 103 SetConstraintProperty("maxWidth", max_size.width(), bounds_properties.get());
104 SetConstraintProperty( 104 SetConstraintProperty(
105 "maxHeight", max_size.height(), bounds_properties.get()); 105 "maxHeight", max_size.height(), bounds_properties.get());
106 106
107 window_properties->Set(bounds_name, bounds_properties.release()); 107 window_properties->Set(bounds_name, std::move(bounds_properties));
108 } 108 }
109 109
110 // Combines the constraints of the content and window, and returns constraints 110 // Combines the constraints of the content and window, and returns constraints
111 // for the window. 111 // for the window.
112 gfx::Size GetCombinedWindowConstraints(const gfx::Size& window_constraints, 112 gfx::Size GetCombinedWindowConstraints(const gfx::Size& window_constraints,
113 const gfx::Size& content_constraints, 113 const gfx::Size& content_constraints,
114 const gfx::Insets& frame_insets) { 114 const gfx::Insets& frame_insets) {
115 gfx::Size combined_constraints(window_constraints); 115 gfx::Size combined_constraints(window_constraints);
116 if (content_constraints.width() > 0) { 116 if (content_constraints.width() > 0) {
117 combined_constraints.set_width( 117 combined_constraints.set_width(
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 region.bounds.x(), 1118 region.bounds.x(),
1119 region.bounds.y(), 1119 region.bounds.y(),
1120 region.bounds.right(), 1120 region.bounds.right(),
1121 region.bounds.bottom(), 1121 region.bounds.bottom(),
1122 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1122 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1123 } 1123 }
1124 return sk_region; 1124 return sk_region;
1125 } 1125 }
1126 1126
1127 } // namespace extensions 1127 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698