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

Side by Side Diff: athena/main/athena_main.cc

Issue 543123004: Close AppWindow to perform clean shutdown (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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/activity/public/activity_factory.h" 5 #include "athena/activity/public/activity_factory.h"
6 #include "athena/activity/public/activity_manager.h" 6 #include "athena/activity/public/activity_manager.h"
7 #include "athena/content/public/web_contents_view_delegate_creator.h" 7 #include "athena/content/public/web_contents_view_delegate_creator.h"
8 #include "athena/env/public/athena_env.h" 8 #include "athena/env/public/athena_env.h"
9 #include "athena/extensions/public/extensions_delegate.h" 9 #include "athena/extensions/public/extensions_delegate.h"
10 #include "athena/main/athena_content_client.h" 10 #include "athena/main/athena_content_client.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 public: 44 public:
45 AthenaDesktopController() {} 45 AthenaDesktopController() {}
46 virtual ~AthenaDesktopController() {} 46 virtual ~AthenaDesktopController() {}
47 47
48 private: 48 private:
49 // extensions::DesktopController: 49 // extensions::DesktopController:
50 virtual aura::WindowTreeHost* GetHost() OVERRIDE { 50 virtual aura::WindowTreeHost* GetHost() OVERRIDE {
51 return athena::AthenaEnv::Get()->GetHost(); 51 return athena::AthenaEnv::Get()->GetHost();
52 } 52 }
53 53
54 // Creates a new app window and adds it to the desktop. The desktop maintains 54 // Creates a new ShellAppWindow and adds it to the desktop. The desktop
55 // ownership of the window. 55 // maintains ownership of the window.
56 virtual extensions::ShellAppWindow* CreateAppWindow( 56 virtual extensions::ShellAppWindow* CreateShellAppWindow(
57 content::BrowserContext* context, 57 content::BrowserContext* context,
58 const extensions::Extension* extension) OVERRIDE { 58 const extensions::Extension* extension) OVERRIDE {
59 extensions::ShellAppWindow* app_window = new extensions::ShellAppWindow(); 59 extensions::ShellAppWindow* app_window = new extensions::ShellAppWindow();
60 app_window->Init(context, extension, gfx::Size(100, 100)); 60 app_window->Init(context, extension, gfx::Size(100, 100));
61 athena::ActivityManager::Get()->AddActivity( 61 athena::ActivityManager::Get()->AddActivity(
62 athena::ActivityFactory::Get()->CreateAppActivity(app_window, 62 athena::ActivityFactory::Get()->CreateAppActivity(app_window,
63 extension->id())); 63 extension->id()));
64 return app_window; 64 return app_window;
65 } 65 }
66 66
67 // Creates a new app window and adds it to the desktop. The desktop maintains
James Cook 2014/09/08 18:14:31 The desktop maintains ownership? I thought it had
68 // ownership of the window.
69 virtual extensions::AppWindow* CreateAppWindow(
70 content::BrowserContext* context,
71 const extensions::Extension* extension) OVERRIDE {
72 NOTIMPLEMENTED();
73 return NULL;
74 }
75
67 // Adds the window to the desktop. 76 // Adds the window to the desktop.
68 virtual void AddAppWindow(aura::Window* window) OVERRIDE { 77 virtual void AddAppWindow(aura::Window* window) OVERRIDE {
69 NOTIMPLEMENTED(); 78 NOTIMPLEMENTED();
70 } 79 }
71 80
72 // Closes and destroys the app windows. 81 // Closes and destroys the app windows.
73 virtual void CloseAppWindows() OVERRIDE {} 82 virtual void CloseAppWindows() OVERRIDE {}
74 83
75 DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController); 84 DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController);
76 }; 85 };
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 197
189 int main(int argc, const char** argv) { 198 int main(int argc, const char** argv) {
190 AthenaMainDelegate delegate; 199 AthenaMainDelegate delegate;
191 content::ContentMainParams params(&delegate); 200 content::ContentMainParams params(&delegate);
192 201
193 params.argc = argc; 202 params.argc = argc;
194 params.argv = argv; 203 params.argv = argv;
195 204
196 return content::ContentMain(params); 205 return content::ContentMain(params);
197 } 206 }
OLDNEW
« no previous file with comments | « no previous file | extensions/shell/browser/api/shell/shell_api.cc » ('j') | extensions/shell/browser/shell_desktop_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698