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

Side by Side Diff: chrome/browser/extensions/api/app_window/app_window_api.cc

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: appshell Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698