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 544953003: Supprot V2 app: step1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/main/athena_frame_view.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/public/athena_launcher.h" 5 #include "athena/main/public/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_creator.h" 10 #include "athena/content/public/content_activity_factory_creator.h"
11 #include "athena/env/public/athena_env.h" 11 #include "athena/env/public/athena_env.h"
12 #include "athena/extensions/public/extension_app_model_builder.h" 12 #include "athena/extensions/public/extension_app_model_builder.h"
13 #include "athena/extensions/public/extensions_delegate.h" 13 #include "athena/extensions/public/extensions_delegate.h"
14 #include "athena/home/public/home_card.h" 14 #include "athena/home/public/home_card.h"
15 #include "athena/input/public/input_manager.h" 15 #include "athena/input/public/input_manager.h"
16 #include "athena/main/athena_views_delegate.h"
16 #include "athena/main/placeholder.h" 17 #include "athena/main/placeholder.h"
17 #include "athena/main/placeholder.h" 18 #include "athena/main/placeholder.h"
18 #include "athena/main/url_search_provider.h" 19 #include "athena/main/url_search_provider.h"
19 #include "athena/resource_manager/public/resource_manager.h" 20 #include "athena/resource_manager/public/resource_manager.h"
20 #include "athena/screen/public/screen_manager.h" 21 #include "athena/screen/public/screen_manager.h"
21 #include "athena/screen/public/screen_manager.h"
22 #include "athena/system/public/system_ui.h" 22 #include "athena/system/public/system_ui.h"
23 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" 23 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h"
24 #include "athena/wm/public/window_manager.h" 24 #include "athena/wm/public/window_manager.h"
25 #include "base/command_line.h" 25 #include "base/command_line.h"
26 #include "base/memory/scoped_ptr.h" 26 #include "base/memory/scoped_ptr.h"
27 #include "ui/app_list/app_list_switches.h" 27 #include "ui/app_list/app_list_switches.h"
28 #include "ui/aura/window_property.h" 28 #include "ui/aura/window_property.h"
29 #include "ui/aura/window_tree_host.h" 29 #include "ui/aura/window_tree_host.h"
30 #include "ui/keyboard/keyboard_controller.h" 30 #include "ui/keyboard/keyboard_controller.h"
31 #include "ui/keyboard/keyboard_controller_observer.h" 31 #include "ui/keyboard/keyboard_controller_observer.h"
32 #include "ui/native_theme/native_theme_switches.h" 32 #include "ui/native_theme/native_theme_switches.h"
33 #include "ui/views/views_delegate.h"
34 #include "ui/wm/core/visibility_controller.h" 33 #include "ui/wm/core/visibility_controller.h"
35 34
36 #if defined(USE_X11) 35 #if defined(USE_X11)
37 #include "ui/events/x/touch_factory_x11.h" 36 #include "ui/events/x/touch_factory_x11.h"
38 #endif 37 #endif
39 38
40 namespace athena { 39 namespace athena {
41 struct AthenaEnvState; 40 struct AthenaEnvState;
42 } 41 }
43 42
(...skipping 27 matching lines...) Expand all
71 } 70 }
72 71
73 private: 72 private:
74 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE { 73 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE {
75 HomeCard::Get()->UpdateVirtualKeyboardBounds(new_bounds); 74 HomeCard::Get()->UpdateVirtualKeyboardBounds(new_bounds);
76 } 75 }
77 76
78 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardObserver); 77 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardObserver);
79 }; 78 };
80 79
81 class AthenaViewsDelegate : public views::ViewsDelegate {
82 public:
83 AthenaViewsDelegate() {}
84 virtual ~AthenaViewsDelegate() {}
85
86 private:
87 // views::ViewsDelegate:
88 virtual void OnBeforeWidgetInit(
89 views::Widget::InitParams* params,
90 views::internal::NativeWidgetDelegate* delegate) OVERRIDE {
91 params->context = athena::ScreenManager::Get()->GetContext();
92 }
93
94 DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate);
95 };
96
97 void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) { 80 void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) {
98 athena::AthenaEnv::Create(); 81 athena::AthenaEnv::Create();
99 82
100 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 83 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
101 84
102 // Force showing in the experimental app-list view. 85 // Force showing in the experimental app-list view.
103 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); 86 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList);
104 command_line->AppendSwitch(switches::kEnableOverlayScrollbar); 87 command_line->AppendSwitch(switches::kEnableOverlayScrollbar);
105 88
106 #if defined(USE_X11) 89 #if defined(USE_X11)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 athena::SystemUI::Shutdown(); 144 athena::SystemUI::Shutdown();
162 athena::ScreenManager::Shutdown(); 145 athena::ScreenManager::Shutdown();
163 athena::InputManager::Shutdown(); 146 athena::InputManager::Shutdown();
164 athena::ExtensionsDelegate::Shutdown(); 147 athena::ExtensionsDelegate::Shutdown();
165 athena::AthenaEnv::Shutdown(); 148 athena::AthenaEnv::Shutdown();
166 149
167 delete views::ViewsDelegate::views_delegate; 150 delete views::ViewsDelegate::views_delegate;
168 } 151 }
169 152
170 } // namespace athena 153 } // namespace athena
OLDNEW
« no previous file with comments | « athena/main/athena_frame_view.cc ('k') | athena/main/athena_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698