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

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

Issue 397343003: Introduce centered view and bottom view for home card. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « athena/home/minimized_home.cc ('k') | ui/app_list/views/tile_item_view.h » ('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 "apps/shell/app/shell_main_delegate.h" 5 #include "apps/shell/app/shell_main_delegate.h"
6 #include "apps/shell/browser/shell_browser_main_delegate.h" 6 #include "apps/shell/browser/shell_browser_main_delegate.h"
7 #include "apps/shell/browser/shell_content_browser_client.h" 7 #include "apps/shell/browser/shell_content_browser_client.h"
8 #include "apps/shell/browser/shell_desktop_controller.h" 8 #include "apps/shell/browser/shell_desktop_controller.h"
9 #include "apps/shell/browser/shell_extension_system.h" 9 #include "apps/shell/browser/shell_extension_system.h"
10 #include "apps/shell/common/switches.h" 10 #include "apps/shell/common/switches.h"
11 #include "apps/shell/renderer/shell_renderer_main_delegate.h" 11 #include "apps/shell/renderer/shell_renderer_main_delegate.h"
12 #include "athena/content/public/content_activity_factory.h" 12 #include "athena/content/public/content_activity_factory.h"
13 #include "athena/content/public/content_app_model_builder.h" 13 #include "athena/content/public/content_app_model_builder.h"
14 #include "athena/home/public/home_card.h" 14 #include "athena/home/public/home_card.h"
15 #include "athena/main/athena_app_window_controller.h" 15 #include "athena/main/athena_app_window_controller.h"
16 #include "athena/main/athena_launcher.h" 16 #include "athena/main/athena_launcher.h"
17 #include "athena/main/debug/debug_window.h" 17 #include "athena/main/debug/debug_window.h"
18 #include "athena/main/placeholder.h" 18 #include "athena/main/placeholder.h"
19 #include "athena/main/url_search_provider.h" 19 #include "athena/main/url_search_provider.h"
20 #include "athena/screen/public/screen_manager.h" 20 #include "athena/screen/public/screen_manager.h"
21 #include "athena/virtual_keyboard/public/virtual_keyboard_bindings.h" 21 #include "athena/virtual_keyboard/public/virtual_keyboard_bindings.h"
22 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" 22 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h"
23 #include "base/command_line.h" 23 #include "base/command_line.h"
24 #include "base/file_util.h" 24 #include "base/file_util.h"
25 #include "base/path_service.h" 25 #include "base/path_service.h"
26 #include "content/public/app/content_main.h" 26 #include "content/public/app/content_main.h"
27 #include "ui/app_list/app_list_switches.h"
27 #include "ui/aura/window_tree_host.h" 28 #include "ui/aura/window_tree_host.h"
28 #include "ui/base/resource/resource_bundle.h" 29 #include "ui/base/resource/resource_bundle.h"
29 #include "ui/keyboard/keyboard_controller.h" 30 #include "ui/keyboard/keyboard_controller.h"
30 #include "ui/keyboard/keyboard_controller_observer.h" 31 #include "ui/keyboard/keyboard_controller_observer.h"
31 #include "ui/wm/core/visibility_controller.h" 32 #include "ui/wm/core/visibility_controller.h"
32 33
33 namespace { 34 namespace {
34 35
35 // We want to load the sample calculator app by default, for a while. Expecting 36 // We want to load the sample calculator app by default, for a while. Expecting
36 // to run athena_main at src/ 37 // to run athena_main at src/
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 }; 75 };
75 76
76 class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { 77 class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
77 public: 78 public:
78 AthenaBrowserMainDelegate() {} 79 AthenaBrowserMainDelegate() {}
79 virtual ~AthenaBrowserMainDelegate() {} 80 virtual ~AthenaBrowserMainDelegate() {}
80 81
81 // apps::ShellBrowserMainDelegate: 82 // apps::ShellBrowserMainDelegate:
82 virtual void Start(content::BrowserContext* context) OVERRIDE { 83 virtual void Start(content::BrowserContext* context) OVERRIDE {
83 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 84 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
85
86 // Force showing in the experimental app-list view.
87 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList);
88
84 base::FilePath app_dir = base::FilePath::FromUTF8Unsafe( 89 base::FilePath app_dir = base::FilePath::FromUTF8Unsafe(
85 command_line->HasSwitch(apps::switches::kAppShellAppPath) ? 90 command_line->HasSwitch(apps::switches::kAppShellAppPath) ?
86 command_line->GetSwitchValueNative(apps::switches::kAppShellAppPath) : 91 command_line->GetSwitchValueNative(apps::switches::kAppShellAppPath) :
87 kDefaultAppPath); 92 kDefaultAppPath);
88 93
89 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); 94 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir);
90 if (base::DirectoryExists(app_absolute_dir)) { 95 if (base::DirectoryExists(app_absolute_dir)) {
91 extensions::ShellExtensionSystem* extension_system = 96 extensions::ShellExtensionSystem* extension_system =
92 static_cast<extensions::ShellExtensionSystem*>( 97 static_cast<extensions::ShellExtensionSystem*>(
93 extensions::ExtensionSystem::Get(context)); 98 extensions::ExtensionSystem::Get(context));
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 195
191 int main(int argc, const char** argv) { 196 int main(int argc, const char** argv) {
192 AthenaMainDelegate delegate; 197 AthenaMainDelegate delegate;
193 content::ContentMainParams params(&delegate); 198 content::ContentMainParams params(&delegate);
194 199
195 params.argc = argc; 200 params.argc = argc;
196 params.argv = argv; 201 params.argv = argv;
197 202
198 return content::ContentMain(params); 203 return content::ContentMain(params);
199 } 204 }
OLDNEW
« no previous file with comments | « athena/home/minimized_home.cc ('k') | ui/app_list/views/tile_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698