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

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

Issue 331323008: app-shell: Introduce a ShellRendererMainDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 6 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/main/DEPS ('k') | no next file » | 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_desktop_controller.h" 7 #include "apps/shell/browser/shell_desktop_controller.h"
8 #include "apps/shell/browser/shell_extension_system.h" 8 #include "apps/shell/browser/shell_extension_system.h"
9 #include "apps/shell/renderer/shell_renderer_main_delegate.h"
9 #include "athena/content/public/content_activity_factory.h" 10 #include "athena/content/public/content_activity_factory.h"
10 #include "athena/content/public/content_app_model_builder.h" 11 #include "athena/content/public/content_app_model_builder.h"
11 #include "athena/home/public/home_card.h" 12 #include "athena/home/public/home_card.h"
12 #include "athena/main/athena_app_window_controller.h" 13 #include "athena/main/athena_app_window_controller.h"
13 #include "athena/main/athena_launcher.h" 14 #include "athena/main/athena_launcher.h"
14 #include "athena/main/placeholder.h" 15 #include "athena/main/placeholder.h"
15 #include "athena/main/url_search_provider.h" 16 #include "athena/main/url_search_provider.h"
16 #include "base/command_line.h" 17 #include "base/command_line.h"
17 #include "base/file_util.h" 18 #include "base/file_util.h"
18 #include "content/public/app/content_main.h" 19 #include "content/public/app/content_main.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // it can initialize its own window manager logic. 57 // it can initialize its own window manager logic.
57 apps::ShellDesktopController* desktop = new apps::ShellDesktopController(); 58 apps::ShellDesktopController* desktop = new apps::ShellDesktopController();
58 desktop->SetAppWindowController(new athena::AthenaAppWindowController()); 59 desktop->SetAppWindowController(new athena::AthenaAppWindowController());
59 return desktop; 60 return desktop;
60 } 61 }
61 62
62 private: 63 private:
63 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); 64 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
64 }; 65 };
65 66
67 class AthenaRendererMainDelegate : public apps::ShellRendererMainDelegate {
68 public:
69 AthenaRendererMainDelegate() {}
70 virtual ~AthenaRendererMainDelegate() {}
71
72 private:
73 // apps::ShellRendererMainDelegate:
74 virtual void OnThreadStarted(content::RenderThread* thread) OVERRIDE {}
75
76 virtual void OnViewCreated(content::RenderView* render_view) OVERRIDE {}
77
78 DISALLOW_COPY_AND_ASSIGN(AthenaRendererMainDelegate);
79 };
80
66 class AthenaMainDelegate : public apps::ShellMainDelegate { 81 class AthenaMainDelegate : public apps::ShellMainDelegate {
67 public: 82 public:
68 AthenaMainDelegate() {} 83 AthenaMainDelegate() {}
69 virtual ~AthenaMainDelegate() {} 84 virtual ~AthenaMainDelegate() {}
70 85
71 private: 86 private:
72 // apps::ShellMainDelegate: 87 // apps::ShellMainDelegate:
73 virtual apps::ShellBrowserMainDelegate* CreateShellBrowserMainDelegate() 88 virtual apps::ShellBrowserMainDelegate* CreateShellBrowserMainDelegate()
74 OVERRIDE { 89 OVERRIDE {
75 return new AthenaBrowserMainDelegate(); 90 return new AthenaBrowserMainDelegate();
76 } 91 }
77 92
93 virtual scoped_ptr<apps::ShellRendererMainDelegate>
94 CreateShellRendererMainDelegate() OVERRIDE {
95 return scoped_ptr<apps::ShellRendererMainDelegate>(
96 new AthenaRendererMainDelegate());
97 }
98
78 DISALLOW_COPY_AND_ASSIGN(AthenaMainDelegate); 99 DISALLOW_COPY_AND_ASSIGN(AthenaMainDelegate);
79 }; 100 };
80 101
81 int main(int argc, const char** argv) { 102 int main(int argc, const char** argv) {
82 AthenaMainDelegate delegate; 103 AthenaMainDelegate delegate;
83 content::ContentMainParams params(&delegate); 104 content::ContentMainParams params(&delegate);
84 105
85 params.argc = argc; 106 params.argc = argc;
86 params.argv = argv; 107 params.argv = argv;
87 108
88 return content::ContentMain(params); 109 return content::ContentMain(params);
89 } 110 }
OLDNEW
« no previous file with comments | « athena/main/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698