| 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 "chrome/browser/extensions/api/app_window/app_window_api.h" | 5 #include "chrome/browser/extensions/api/app_window/app_window_api.h" |
| 6 | 6 |
| 7 #include "apps/app_window.h" | 7 #include "apps/app_window.h" |
| 8 #include "apps/app_window_contents.h" | 8 #include "apps/app_window_contents.h" |
| 9 #include "apps/app_window_registry.h" | 9 #include "apps/app_window_registry.h" |
| 10 #include "apps/apps_client.h" | 10 #include "apps/apps_client.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 } // namespace | 133 } // namespace |
| 134 | 134 |
| 135 AppWindowCreateFunction::AppWindowCreateFunction() | 135 AppWindowCreateFunction::AppWindowCreateFunction() |
| 136 : inject_html_titlebar_(false) {} | 136 : inject_html_titlebar_(false) {} |
| 137 | 137 |
| 138 void AppWindowCreateFunction::SendDelayedResponse() { | 138 void AppWindowCreateFunction::SendDelayedResponse() { |
| 139 SendResponse(true); | 139 SendResponse(true); |
| 140 } | 140 } |
| 141 | 141 |
| 142 bool AppWindowCreateFunction::RunImpl() { | 142 bool AppWindowCreateFunction::RunAsync() { |
| 143 // Don't create app window if the system is shutting down. | 143 // Don't create app window if the system is shutting down. |
| 144 if (extensions::ExtensionsBrowserClient::Get()->IsShuttingDown()) | 144 if (extensions::ExtensionsBrowserClient::Get()->IsShuttingDown()) |
| 145 return false; | 145 return false; |
| 146 | 146 |
| 147 scoped_ptr<Create::Params> params(Create::Params::Create(*args_)); | 147 scoped_ptr<Create::Params> params(Create::Params::Create(*args_)); |
| 148 EXTENSION_FUNCTION_VALIDATE(params.get()); | 148 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| 149 | 149 |
| 150 GURL url = GetExtension()->GetResourceURL(params->url); | 150 GURL url = GetExtension()->GetResourceURL(params->url); |
| 151 // Allow absolute URLs for component apps, otherwise prepend the extension | 151 // Allow absolute URLs for component apps, otherwise prepend the extension |
| 152 // path. | 152 // path. |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 // TODO(benwells): Remove this code once we get agreement to use the new | 492 // TODO(benwells): Remove this code once we get agreement to use the new |
| 493 // native style frame. | 493 // native style frame. |
| 494 create_params->has_frame_color = true; | 494 create_params->has_frame_color = true; |
| 495 create_params->active_frame_color = SK_ColorWHITE; | 495 create_params->active_frame_color = SK_ColorWHITE; |
| 496 create_params->inactive_frame_color = SK_ColorWHITE; | 496 create_params->inactive_frame_color = SK_ColorWHITE; |
| 497 } | 497 } |
| 498 #endif | 498 #endif |
| 499 } | 499 } |
| 500 | 500 |
| 501 } // namespace extensions | 501 } // namespace extensions |
| OLD | NEW |