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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 "2D22CDB6583FD0A13758AEBE8B15E45208B4E9A7", | 256 "2D22CDB6583FD0A13758AEBE8B15E45208B4E9A7", |
257 "E7E2461CE072DF036CF9592740196159E2D7C089", // http://crbug.com/356200 | 257 "E7E2461CE072DF036CF9592740196159E2D7C089", // http://crbug.com/356200 |
258 "A74A4D44C7CFCD8844830E6140C8D763E12DD8F3", | 258 "A74A4D44C7CFCD8844830E6140C8D763E12DD8F3", |
259 "312745D9BF916161191143F6490085EEA0434997", | 259 "312745D9BF916161191143F6490085EEA0434997", |
260 "53041A2FA309EECED01FFC751E7399186E860B2C", | 260 "53041A2FA309EECED01FFC751E7399186E860B2C", |
261 "A07A5B743CD82A1C2579DB77D353C98A23201EEF", // http://crbug.com/413748 | 261 "A07A5B743CD82A1C2579DB77D353C98A23201EEF", // http://crbug.com/413748 |
262 "F16F23C83C5F6DAD9B65A120448B34056DD80691", | 262 "F16F23C83C5F6DAD9B65A120448B34056DD80691", |
263 "0F585FB1D0FDFBEBCE1FEB5E9DFFB6DA476B8C9B" | 263 "0F585FB1D0FDFBEBCE1FEB5E9DFFB6DA476B8C9B" |
264 }; | 264 }; |
265 if (AppWindowClient::Get()->IsCurrentChannelOlderThanDev() && | 265 if (AppWindowClient::Get()->IsCurrentChannelOlderThanDev() && |
266 !SimpleFeature::IsIdInList( | 266 !SimpleFeature::IsIdInArray( |
267 extension_id(), | 267 extension_id(), kWhitelist, arraysize(kWhitelist))) { |
268 std::set<std::string>(kWhitelist, | |
269 kWhitelist + arraysize(kWhitelist)))) { | |
270 error_ = app_window_constants::kAlphaEnabledWrongChannel; | 268 error_ = app_window_constants::kAlphaEnabledWrongChannel; |
271 return false; | 269 return false; |
272 } | 270 } |
273 if (!extension()->permissions_data()->HasAPIPermission( | 271 if (!extension()->permissions_data()->HasAPIPermission( |
274 APIPermission::kAlphaEnabled)) { | 272 APIPermission::kAlphaEnabled)) { |
275 error_ = app_window_constants::kAlphaEnabledMissingPermission; | 273 error_ = app_window_constants::kAlphaEnabledMissingPermission; |
276 return false; | 274 return false; |
277 } | 275 } |
278 if (create_params.frame != AppWindow::FRAME_NONE) { | 276 if (create_params.frame != AppWindow::FRAME_NONE) { |
279 error_ = app_window_constants::kAlphaEnabledNeedsFrameNone; | 277 error_ = app_window_constants::kAlphaEnabledNeedsFrameNone; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 541 |
544 if (options.frame->as_frame_options->inactive_color.get()) { | 542 if (options.frame->as_frame_options->inactive_color.get()) { |
545 error_ = app_window_constants::kInactiveColorWithoutColor; | 543 error_ = app_window_constants::kInactiveColorWithoutColor; |
546 return false; | 544 return false; |
547 } | 545 } |
548 | 546 |
549 return true; | 547 return true; |
550 } | 548 } |
551 | 549 |
552 } // namespace extensions | 550 } // namespace extensions |
OLD | NEW |