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

Side by Side Diff: athena/extensions/chrome/extensions_delegate_impl.cc

Issue 596493002: Add actiivity in factory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/athena_app_delegate_base.cc ('k') | athena/home/home_card_unittest.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/extensions/public/extensions_delegate.h" 5 #include "athena/extensions/public/extensions_delegate.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"
9 #include "athena/extensions/chrome/athena_chrome_app_window_client.h" 8 #include "athena/extensions/chrome/athena_chrome_app_window_client.h"
10 #include "base/macros.h" 9 #include "base/macros.h"
11 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
13 #include "chrome/browser/extensions/extension_util.h" 12 #include "chrome/browser/extensions/extension_util.h"
14 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/extensions/application_launch.h" 14 #include "chrome/browser/ui/extensions/application_launch.h"
16 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" 15 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
17 #include "extensions/browser/extension_registry.h" 16 #include "extensions/browser/extension_registry.h"
18 #include "extensions/browser/extension_system.h" 17 #include "extensions/browser/extension_system.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return false; 89 return false;
91 } 90 }
92 91
93 void LaunchV1App(const AppLaunchParams& params, 92 void LaunchV1App(const AppLaunchParams& params,
94 const extensions::Extension* extension) { 93 const extensions::Extension* extension) {
95 // TODO(oshima): Just activate if the app is already running. 94 // TODO(oshima): Just activate if the app is already running.
96 const GURL url_input = params.override_url; 95 const GURL url_input = params.override_url;
97 96
98 DCHECK(!url_input.is_empty() || extension); 97 DCHECK(!url_input.is_empty() || extension);
99 GURL url = UrlForExtension(extension, url_input); 98 GURL url = UrlForExtension(extension, url_input);
100 athena::ActivityManager::Get()->AddActivity( 99 athena::ActivityFactory::Get()->CreateWebActivity(
101 athena::ActivityFactory::Get()->CreateWebActivity( 100 GetBrowserContext(), base::UTF8ToUTF16(extension->name()), url);
102 GetBrowserContext(), base::UTF8ToUTF16(extension->name()), url));
103 } 101 }
104 102
105 // ExtensionService for the browser context this is created for. 103 // ExtensionService for the browser context this is created for.
106 ExtensionService* extension_service_; 104 ExtensionService* extension_service_;
107 105
108 // Installed extensions. 106 // Installed extensions.
109 extensions::ExtensionSet extensions_; 107 extensions::ExtensionSet extensions_;
110 108
111 AthenaChromeAppWindowClient app_window_client_; 109 AthenaChromeAppWindowClient app_window_client_;
112 110
113 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsDelegate); 111 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsDelegate);
114 }; 112 };
115 113
116 } // namespace 114 } // namespace
117 115
118 // static 116 // static
119 void ExtensionsDelegate::CreateExtensionsDelegateForChrome( 117 void ExtensionsDelegate::CreateExtensionsDelegateForChrome(
120 content::BrowserContext* context) { 118 content::BrowserContext* context) {
121 new ChromeExtensionsDelegate(context); 119 new ChromeExtensionsDelegate(context);
122 } 120 }
123 121
124 } // namespace athena 122 } // namespace athena
OLDNEW
« no previous file with comments | « athena/extensions/athena_app_delegate_base.cc ('k') | athena/home/home_card_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698