OLD | NEW |
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/content/public/content_activity_factory.h" | 5 #include "athena/content/public/content_activity_factory.h" |
6 #include "athena/content/public/content_app_model_builder.h" | 6 #include "athena/content/public/content_app_model_builder.h" |
7 #include "athena/home/public/home_card.h" | 7 #include "athena/home/public/home_card.h" |
8 #include "athena/main/athena_app_window_controller.h" | 8 #include "athena/main/athena_app_window_controller.h" |
9 #include "athena/main/athena_launcher.h" | 9 #include "athena/main/athena_launcher.h" |
10 #include "athena/main/debug/debug_window.h" | 10 #include "athena/main/debug/debug_window.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "extensions/shell/browser/shell_content_browser_client.h" | 22 #include "extensions/shell/browser/shell_content_browser_client.h" |
23 #include "extensions/shell/browser/shell_desktop_controller.h" | 23 #include "extensions/shell/browser/shell_desktop_controller.h" |
24 #include "extensions/shell/browser/shell_extension_system.h" | 24 #include "extensions/shell/browser/shell_extension_system.h" |
25 #include "extensions/shell/common/switches.h" | 25 #include "extensions/shell/common/switches.h" |
26 #include "extensions/shell/renderer/shell_renderer_main_delegate.h" | 26 #include "extensions/shell/renderer/shell_renderer_main_delegate.h" |
27 #include "ui/app_list/app_list_switches.h" | 27 #include "ui/app_list/app_list_switches.h" |
28 #include "ui/aura/window_tree_host.h" | 28 #include "ui/aura/window_tree_host.h" |
29 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.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/wm/core/visibility_controller.h" | 33 #include "ui/wm/core/visibility_controller.h" |
33 | 34 |
34 namespace { | 35 namespace { |
35 | 36 |
36 // We want to load the sample calculator app by default, for a while. Expecting | 37 // We want to load the sample calculator app by default, for a while. Expecting |
37 // to run athena_main at src/ | 38 // to run athena_main at src/ |
38 const char kDefaultAppPath[] = | 39 const char kDefaultAppPath[] = |
39 "chrome/common/extensions/docs/examples/apps/calculator/app"; | 40 "chrome/common/extensions/docs/examples/apps/calculator/app"; |
40 } // namespace | 41 } // namespace |
41 | 42 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 public: | 79 public: |
79 AthenaBrowserMainDelegate() {} | 80 AthenaBrowserMainDelegate() {} |
80 virtual ~AthenaBrowserMainDelegate() {} | 81 virtual ~AthenaBrowserMainDelegate() {} |
81 | 82 |
82 // extensions::ShellBrowserMainDelegate: | 83 // extensions::ShellBrowserMainDelegate: |
83 virtual void Start(content::BrowserContext* context) OVERRIDE { | 84 virtual void Start(content::BrowserContext* context) OVERRIDE { |
84 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 85 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
85 | 86 |
86 // Force showing in the experimental app-list view. | 87 // Force showing in the experimental app-list view. |
87 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); | 88 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); |
| 89 command_line->AppendSwitch(switches::kEnableOverlayScrollbar); |
88 | 90 |
89 base::FilePath app_dir = base::FilePath::FromUTF8Unsafe( | 91 base::FilePath app_dir = base::FilePath::FromUTF8Unsafe( |
90 command_line->HasSwitch(extensions::switches::kAppShellAppPath) | 92 command_line->HasSwitch(extensions::switches::kAppShellAppPath) |
91 ? command_line->GetSwitchValueNative( | 93 ? command_line->GetSwitchValueNative( |
92 extensions::switches::kAppShellAppPath) | 94 extensions::switches::kAppShellAppPath) |
93 : kDefaultAppPath); | 95 : kDefaultAppPath); |
94 | 96 |
95 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); | 97 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); |
96 if (base::DirectoryExists(app_absolute_dir)) { | 98 if (base::DirectoryExists(app_absolute_dir)) { |
97 extensions::ShellExtensionSystem* extension_system = | 99 extensions::ShellExtensionSystem* extension_system = |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 202 |
201 int main(int argc, const char** argv) { | 203 int main(int argc, const char** argv) { |
202 AthenaMainDelegate delegate; | 204 AthenaMainDelegate delegate; |
203 content::ContentMainParams params(&delegate); | 205 content::ContentMainParams params(&delegate); |
204 | 206 |
205 params.argc = argc; | 207 params.argc = argc; |
206 params.argv = argv; | 208 params.argv = argv; |
207 | 209 |
208 return content::ContentMain(params); | 210 return content::ContentMain(params); |
209 } | 211 } |
OLD | NEW |