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

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

Issue 498023003: Delete activity upon window deletion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup 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
« no previous file with comments | « athena/extensions/shell/extensions_delegate_impl.cc ('k') | athena/main/athena_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/main/athena_launcher.h" 5 #include "athena/main/athena_launcher.h"
6 6
7 #include "athena/activity/public/activity_factory.h" 7 #include "athena/activity/public/activity_factory.h"
8 #include "athena/activity/public/activity_manager.h" 8 #include "athena/activity/public/activity_manager.h"
9 #include "athena/content/public/app_registry.h" 9 #include "athena/content/public/app_registry.h"
10 #include "athena/content/public/content_activity_factory.h" 10 #include "athena/content/public/content_activity_factory.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 class AthenaViewsDelegate : public views::ViewsDelegate { 82 class AthenaViewsDelegate : public views::ViewsDelegate {
83 public: 83 public:
84 AthenaViewsDelegate() {} 84 AthenaViewsDelegate() {}
85 virtual ~AthenaViewsDelegate() {} 85 virtual ~AthenaViewsDelegate() {}
86 86
87 private: 87 private:
88 // views::ViewsDelegate: 88 // views::ViewsDelegate:
89 virtual void OnBeforeWidgetInit( 89 virtual void OnBeforeWidgetInit(
90 views::Widget::InitParams* params, 90 views::Widget::InitParams* params,
91 views::internal::NativeWidgetDelegate* delegate) OVERRIDE { 91 views::internal::NativeWidgetDelegate* delegate) OVERRIDE {
92 params->context = athena::ScreenManager::Get()->GetContext();
92 } 93 }
93 94
94 DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate); 95 DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate);
95 }; 96 };
96 97
97 void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) { 98 void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) {
98 athena::AthenaEnv::Create(); 99 athena::AthenaEnv::Create();
99 100
100 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 101 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
101 102
(...skipping 21 matching lines...) Expand all
123 athena::ScreenManager::Create(root_window); 124 athena::ScreenManager::Create(root_window);
124 athena::WindowManager::Create(); 125 athena::WindowManager::Create();
125 athena::AppRegistry::Create(); 126 athena::AppRegistry::Create();
126 SetupBackgroundImage(); 127 SetupBackgroundImage();
127 128
128 athena::ScreenManager::Get()->GetContext()->SetProperty( 129 athena::ScreenManager::Get()->GetContext()->SetProperty(
129 kAthenaEnvStateKey, env_state); 130 kAthenaEnvStateKey, env_state);
130 } 131 }
131 132
132 void StartAthenaSessionWithContext(content::BrowserContext* context) { 133 void StartAthenaSessionWithContext(content::BrowserContext* context) {
133 athena::ExtensionsDelegate::CreateExtensionsDelegateForShell(context);
134 StartAthenaSession(new athena::ContentActivityFactory(), 134 StartAthenaSession(new athena::ContentActivityFactory(),
135 new athena::ContentAppModelBuilder(context)); 135 new athena::ContentAppModelBuilder(context));
136 athena::VirtualKeyboardManager::Create(context); 136 athena::VirtualKeyboardManager::Create(context);
137 athena::HomeCard::Get()->RegisterSearchProvider( 137 athena::HomeCard::Get()->RegisterSearchProvider(
138 new athena::UrlSearchProvider(context)); 138 new athena::UrlSearchProvider(context));
139 AthenaEnvState* env_state = 139 AthenaEnvState* env_state =
140 athena::ScreenManager::Get()->GetContext()->GetProperty( 140 athena::ScreenManager::Get()->GetContext()->GetProperty(
141 kAthenaEnvStateKey); 141 kAthenaEnvStateKey);
142 142
143 env_state->virtual_keyboard_observer.reset(new VirtualKeyboardObserver); 143 env_state->virtual_keyboard_observer.reset(new VirtualKeyboardObserver);
(...skipping 17 matching lines...) Expand all
161 athena::ScreenManager::Shutdown(); 161 athena::ScreenManager::Shutdown();
162 athena::InputManager::Shutdown(); 162 athena::InputManager::Shutdown();
163 athena::SystemUI::Shutdown(); 163 athena::SystemUI::Shutdown();
164 athena::ExtensionsDelegate::Shutdown(); 164 athena::ExtensionsDelegate::Shutdown();
165 athena::AthenaEnv::Shutdown(); 165 athena::AthenaEnv::Shutdown();
166 166
167 delete views::ViewsDelegate::views_delegate; 167 delete views::ViewsDelegate::views_delegate;
168 } 168 }
169 169
170 } // namespace athena 170 } // namespace athena
OLDNEW
« no previous file with comments | « athena/extensions/shell/extensions_delegate_impl.cc ('k') | athena/main/athena_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698