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

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

Issue 634313004: Display dialog when app install succeeds / fails on Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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/extensions/chrome/athena_chrome_app_window_client.h" 8 #include "athena/extensions/chrome/athena_chrome_app_window_client.h"
9 #include "athena/extensions/chrome/athena_extension_install_ui.h"
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/extensions/extension_service.h" 12 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/extensions/extension_util.h" 13 #include "chrome/browser/extensions/extension_util.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/extensions/application_launch.h" 15 #include "chrome/browser/ui/extensions/application_launch.h"
15 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" 16 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
16 #include "extensions/browser/extension_registry.h" 17 #include "extensions/browser/extension_registry.h"
17 #include "extensions/browser/extension_system.h" 18 #include "extensions/browser/extension_system.h"
18 #include "extensions/common/constants.h" 19 #include "extensions/common/constants.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 83 }
83 LaunchV1App(params, extension); 84 LaunchV1App(params, extension);
84 return true; 85 return true;
85 } 86 }
86 87
87 virtual bool UnloadApp(const std::string& app_id) override { 88 virtual bool UnloadApp(const std::string& app_id) override {
88 // TODO(skuhne): Implement using extension service. 89 // TODO(skuhne): Implement using extension service.
89 return false; 90 return false;
90 } 91 }
91 92
93 virtual scoped_ptr<extensions::ExtensionInstallUI> CreateExtensionInstallUI()
94 override {
95 return scoped_ptr<extensions::ExtensionInstallUI>(
96 new AthenaExtensionInstallUI());
97 }
98
92 void LaunchV1App(const AppLaunchParams& params, 99 void LaunchV1App(const AppLaunchParams& params,
93 const extensions::Extension* extension) { 100 const extensions::Extension* extension) {
94 // TODO(oshima): Just activate if the app is already running. 101 // TODO(oshima): Just activate if the app is already running.
95 const GURL url_input = params.override_url; 102 const GURL url_input = params.override_url;
96 103
97 DCHECK(!url_input.is_empty() || extension); 104 DCHECK(!url_input.is_empty() || extension);
98 GURL url = UrlForExtension(extension, url_input); 105 GURL url = UrlForExtension(extension, url_input);
99 athena::ActivityFactory::Get()->CreateWebActivity( 106 athena::ActivityFactory::Get()->CreateWebActivity(
100 GetBrowserContext(), base::UTF8ToUTF16(extension->name()), url); 107 GetBrowserContext(), base::UTF8ToUTF16(extension->name()), url);
101 } 108 }
(...skipping 11 matching lines...) Expand all
113 120
114 } // namespace 121 } // namespace
115 122
116 // static 123 // static
117 void ExtensionsDelegate::CreateExtensionsDelegate( 124 void ExtensionsDelegate::CreateExtensionsDelegate(
118 content::BrowserContext* context) { 125 content::BrowserContext* context) {
119 new ChromeExtensionsDelegate(context); 126 new ChromeExtensionsDelegate(context);
120 } 127 }
121 128
122 } // namespace athena 129 } // namespace athena
OLDNEW
« no previous file with comments | « athena/extensions/chrome/athena_extension_install_ui.cc ('k') | athena/extensions/public/extensions_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698