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

Unified Diff: extensions/shell/browser/api/shell/shell_api.cc

Issue 412713002: Move apps/shell to extensions/shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 40% Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: extensions/shell/browser/api/shell/shell_api.cc
diff --git a/apps/shell/browser/api/shell/shell_api.cc b/extensions/shell/browser/api/shell/shell_api.cc
similarity index 72%
rename from apps/shell/browser/api/shell/shell_api.cc
rename to extensions/shell/browser/api/shell/shell_api.cc
index 53a7bb64c526a83daf78dc5e70ff80d38ee9b2f0..c022f168fae233a697282f2dadad44323f47ba9c 100644
--- a/apps/shell/browser/api/shell/shell_api.cc
+++ b/extensions/shell/browser/api/shell/shell_api.cc
@@ -2,26 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/shell/browser/api/shell/shell_api.h"
+#include "extensions/shell/browser/api/shell/shell_api.h"
-#include "apps/shell/browser/shell_app_window.h"
-#include "apps/shell/browser/shell_desktop_controller.h"
-#include "apps/shell/common/api/shell.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "extensions/common/extension.h"
+#include "extensions/shell/browser/shell_app_window.h"
+#include "extensions/shell/browser/shell_desktop_controller.h"
+#include "extensions/shell/common/api/shell.h"
using base::DictionaryValue;
-namespace CreateWindow = apps::shell_api::shell::CreateWindow;
+namespace CreateWindow = extensions::shell_api::shell::CreateWindow;
+
+namespace extensions {
-namespace apps {
namespace {
const char kInvalidArguments[] = "Invalid arguments";
// Creates a function call result to send to the renderer.
-DictionaryValue* CreateResult(apps::ShellAppWindow* app_window) {
+DictionaryValue* CreateResult(ShellAppWindow* app_window) {
int view_id = app_window->GetRenderViewRoutingID();
DictionaryValue* result = new DictionaryValue;
@@ -47,13 +48,12 @@ ExtensionFunction::ResponseAction ShellCreateWindowFunction::Run() {
return RespondNow(Error(kInvalidArguments));
// The desktop keeps ownership of the window.
- apps::ShellAppWindow* app_window =
- apps::ShellDesktopController::instance()->CreateAppWindow(
- browser_context());
+ ShellAppWindow* app_window =
+ ShellDesktopController::instance()->CreateAppWindow(browser_context());
app_window->LoadURL(url);
// Create the reply to send to the renderer.
return RespondNow(OneArgument(CreateResult(app_window)));
}
-} // namespace apps
+} // namespace extensions
« no previous file with comments | « extensions/shell/browser/api/shell/shell_api.h ('k') | extensions/shell/browser/default_shell_app_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698