| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/api/app_window/app_window_api.h" | 5 #include "extensions/browser/api/app_window/app_window_api.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // If the same property is specified for the inner and outer bounds, raise an | 69 // If the same property is specified for the inner and outer bounds, raise an |
| 70 // error. | 70 // error. |
| 71 bool CheckBoundsConflict(const scoped_ptr<int>& inner_property, | 71 bool CheckBoundsConflict(const scoped_ptr<int>& inner_property, |
| 72 const scoped_ptr<int>& outer_property, | 72 const scoped_ptr<int>& outer_property, |
| 73 const std::string& property_name, | 73 const std::string& property_name, |
| 74 std::string* error) { | 74 std::string* error) { |
| 75 if (inner_property.get() && outer_property.get()) { | 75 if (inner_property.get() && outer_property.get()) { |
| 76 std::vector<std::string> subst; | 76 std::vector<std::string> subst; |
| 77 subst.push_back(property_name); | 77 subst.push_back(property_name); |
| 78 *error = ReplaceStringPlaceholders( | 78 *error = ReplaceStringPlaceholders( |
| 79 app_window_constants::kConflictingBoundsOptions, subst, NULL); | 79 app_window_constants::kConflictingBoundsOptions, subst, nullptr); |
| 80 return false; | 80 return false; |
| 81 } | 81 } |
| 82 | 82 |
| 83 return true; | 83 return true; |
| 84 } | 84 } |
| 85 | 85 |
| 86 // Copy over the bounds specification properties from the API to the | 86 // Copy over the bounds specification properties from the API to the |
| 87 // AppWindow::CreateParams. | 87 // AppWindow::CreateParams. |
| 88 void CopyBoundsSpec(const app_window::BoundsSpecification* input_spec, | 88 void CopyBoundsSpec(const app_window::BoundsSpecification* input_spec, |
| 89 AppWindow::BoundsSpecification* create_spec) { | 89 AppWindow::BoundsSpecification* create_spec) { |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 504 |
| 505 if (options.frame->as_frame_options->inactive_color.get()) { | 505 if (options.frame->as_frame_options->inactive_color.get()) { |
| 506 error_ = app_window_constants::kInactiveColorWithoutColor; | 506 error_ = app_window_constants::kInactiveColorWithoutColor; |
| 507 return false; | 507 return false; |
| 508 } | 508 } |
| 509 | 509 |
| 510 return true; | 510 return true; |
| 511 } | 511 } |
| 512 | 512 |
| 513 } // namespace extensions | 513 } // namespace extensions |
| OLD | NEW |