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

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 extensions::ExtensionInstallUI* CreateExtensionInstallUI() override {
94 return new AthenaExtensionInstallUI();
95 }
96
92 void LaunchV1App(const AppLaunchParams& params, 97 void LaunchV1App(const AppLaunchParams& params,
93 const extensions::Extension* extension) { 98 const extensions::Extension* extension) {
94 // TODO(oshima): Just activate if the app is already running. 99 // TODO(oshima): Just activate if the app is already running.
95 const GURL url_input = params.override_url; 100 const GURL url_input = params.override_url;
96 101
97 DCHECK(!url_input.is_empty() || extension); 102 DCHECK(!url_input.is_empty() || extension);
98 GURL url = UrlForExtension(extension, url_input); 103 GURL url = UrlForExtension(extension, url_input);
99 athena::ActivityFactory::Get()->CreateWebActivity( 104 athena::ActivityFactory::Get()->CreateWebActivity(
100 GetBrowserContext(), base::UTF8ToUTF16(extension->name()), url); 105 GetBrowserContext(), base::UTF8ToUTF16(extension->name()), url);
101 } 106 }
(...skipping 11 matching lines...) Expand all
113 118
114 } // namespace 119 } // namespace
115 120
116 // static 121 // static
117 void ExtensionsDelegate::CreateExtensionsDelegate( 122 void ExtensionsDelegate::CreateExtensionsDelegate(
118 content::BrowserContext* context) { 123 content::BrowserContext* context) {
119 new ChromeExtensionsDelegate(context); 124 new ChromeExtensionsDelegate(context);
120 } 125 }
121 126
122 } // namespace athena 127 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698