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

Unified Diff: athena/main/athena_main.cc

Issue 552133003: Support app.window.create on athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@apifeatures
Patch Set: Created 6 years, 3 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
« no previous file with comments | « athena/main/DEPS ('k') | extensions/browser/app_window/apps_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/athena_main.cc
diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc
index dacad6c72de8c96c637c6f28ef374c7599abe803..0ea372e41925bfef0c8484a5efaa2743d0be9905 100644
--- a/athena/main/athena_main.cc
+++ b/athena/main/athena_main.cc
@@ -17,12 +17,16 @@
#include "components/pdf/renderer/ppb_pdf_impl.h"
#include "content/public/app/content_main.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/browser/app_window/app_window.h"
+#include "extensions/browser/app_window/apps_client.h"
#include "extensions/shell/app/shell_main_delegate.h"
#include "extensions/shell/browser/desktop_controller.h"
+#include "extensions/shell/browser/shell_app_delegate.h"
#include "extensions/shell/browser/shell_app_window.h"
#include "extensions/shell/browser/shell_browser_main_delegate.h"
#include "extensions/shell/browser/shell_content_browser_client.h"
#include "extensions/shell/browser/shell_extension_system.h"
+#include "extensions/shell/browser/shell_native_app_window.h"
#include "extensions/shell/common/shell_content_client.h"
#include "extensions/shell/common/switches.h"
#include "extensions/shell/renderer/shell_content_renderer_client.h"
@@ -84,6 +88,43 @@ class AthenaDesktopController : public extensions::DesktopController {
DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController);
};
+class AthenaAppsClient : public extensions::AppsClient {
+ public:
oshima 2014/09/10 16:11:16 // extensions::AppsClient:
hashimoto 2014/09/11 06:26:35 Done.
+ virtual std::vector<content::BrowserContext*>
+ GetLoadedBrowserContexts() OVERRIDE {
+ NOTIMPLEMENTED();
+ return std::vector<content::BrowserContext*>();
+ }
+
+ virtual extensions::AppWindow* CreateAppWindow(
+ content::BrowserContext* context,
+ const extensions::Extension* extension) OVERRIDE {
+ return new extensions::AppWindow(
+ context, new extensions::ShellAppDelegate, extension);
+ }
+
+ virtual extensions::NativeAppWindow* CreateNativeAppWindow(
+ extensions::AppWindow* window,
+ const extensions::AppWindow::CreateParams& params) OVERRIDE {
+ athena::ActivityManager::Get()->AddActivity(
+ athena::ActivityFactory::Get()->CreateAppActivity(window));
+ return new extensions::ShellNativeAppWindow(window, params);
oshima 2014/09/10 16:11:16 FYI: CreateAppActivity currently creates its own w
hashimoto 2014/09/11 06:26:35 Can't athena be satisfied with aura::Window* inste
+ }
+
+ virtual void IncrementKeepAliveCount() OVERRIDE {}
+
+ virtual void DecrementKeepAliveCount() OVERRIDE {}
+
+ virtual void OpenDevToolsWindow(content::WebContents* web_contents,
+ const base::Closure& callback) OVERRIDE {
+ NOTIMPLEMENTED();
+ }
+
+ virtual bool IsCurrentChannelOlderThanDev() OVERRIDE {
+ return false;
+ }
+};
oshima 2014/09/10 16:11:16 disallow_copy_and_assign
hashimoto 2014/09/11 06:26:35 Done.
+
class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
public:
AthenaBrowserMainDelegate() {}
@@ -122,6 +163,10 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
return new AthenaDesktopController();
}
+ virtual extensions::AppsClient* CreateAppsClient() OVERRIDE {
+ return new AthenaAppsClient();
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
};
« no previous file with comments | « athena/main/DEPS ('k') | extensions/browser/app_window/apps_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698