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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 } // namespace | 131 } // namespace |
132 | 132 |
133 AppWindowCreateFunction::AppWindowCreateFunction() | 133 AppWindowCreateFunction::AppWindowCreateFunction() |
134 : inject_html_titlebar_(false) {} | 134 : inject_html_titlebar_(false) {} |
135 | 135 |
136 void AppWindowCreateFunction::SendDelayedResponse() { | 136 void AppWindowCreateFunction::SendDelayedResponse() { |
137 SendResponse(true); | 137 SendResponse(true); |
138 } | 138 } |
139 | 139 |
140 bool AppWindowCreateFunction::RunImpl() { | 140 bool AppWindowCreateFunction::RunAsync() { |
141 // Don't create app window if the system is shutting down. | 141 // Don't create app window if the system is shutting down. |
142 if (extensions::ExtensionsBrowserClient::Get()->IsShuttingDown()) | 142 if (extensions::ExtensionsBrowserClient::Get()->IsShuttingDown()) |
143 return false; | 143 return false; |
144 | 144 |
145 scoped_ptr<Create::Params> params(Create::Params::Create(*args_)); | 145 scoped_ptr<Create::Params> params(Create::Params::Create(*args_)); |
146 EXTENSION_FUNCTION_VALIDATE(params.get()); | 146 EXTENSION_FUNCTION_VALIDATE(params.get()); |
147 | 147 |
148 GURL url = GetExtension()->GetResourceURL(params->url); | 148 GURL url = GetExtension()->GetResourceURL(params->url); |
149 // Allow absolute URLs for component apps, otherwise prepend the extension | 149 // Allow absolute URLs for component apps, otherwise prepend the extension |
150 // path. | 150 // path. |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 // If not on trunk or dev channel, always use the standard white frame. | 472 // If not on trunk or dev channel, always use the standard white frame. |
473 // TODO(benwells): Remove this code once we get agreement to use the new | 473 // TODO(benwells): Remove this code once we get agreement to use the new |
474 // native style frame. | 474 // native style frame. |
475 create_params->has_frame_color = true; | 475 create_params->has_frame_color = true; |
476 create_params->frame_color = SK_ColorWHITE; | 476 create_params->frame_color = SK_ColorWHITE; |
477 } | 477 } |
478 #endif | 478 #endif |
479 } | 479 } |
480 | 480 |
481 } // namespace extensions | 481 } // namespace extensions |
OLD | NEW |