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

Unified Diff: athena/content/chrome/content_activity_factory.cc

Issue 514293003: Run athena on chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: athena/content/chrome/content_activity_factory.cc
diff --git a/athena/content/chrome/content_activity_factory.cc b/athena/content/chrome/content_activity_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0f6945a43f98c3c518470bebc7fbfd6c38b19dbb
--- /dev/null
+++ b/athena/content/chrome/content_activity_factory.cc
@@ -0,0 +1,47 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "athena/content/content_activity_factory.h"
+
+#include "apps/app_window.h"
+#include "athena/content/app_activity.h"
Jun Mukai 2014/08/28 22:50:45 This file looks like unrelated to chrome. Is hashi
oshima 2014/08/28 23:59:04 apps/app_window currently requires chrome. Once hi
+
+// TODO(oshima): Consolidate this and app shell implementation once
+// crbug.com/403726 is fixed.
+namespace athena {
+namespace {
+
+class ChromeAppActivity : public AppActivity {
+ public:
+ explicit ChromeAppActivity(apps::AppWindow* app_window)
+ : AppActivity(app_window->extension_id()), app_window_(app_window) {}
+
+ private:
+ virtual ~ChromeAppActivity() {}
+
+ // AppActivity:
+ virtual content::WebContents* GetWebContents() OVERRIDE {
+ return app_window_->web_contents();
+ }
+
+ // Not owned.
+ apps::AppWindow* app_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeAppActivity);
+};
+
+} // namespace
+
+Activity* ContentActivityFactory::CreateAppActivity(
+ apps::AppWindow* app_window) {
+ return new ChromeAppActivity(app_window);
+}
+
+Activity* ContentActivityFactory::CreateAppActivity(
+ extensions::ShellAppWindow* app_window,
+ const std::string& app_id) {
+ return NULL;
+}
+
+} // namespace athena

Powered by Google App Engine
This is Rietveld 408576698