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

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

Issue 586613002: Remove AppsClient::GetLoadedBrowserContexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to chrome/browser/apps 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/extensions/shell/athena_shell_app_window_client.h" 7 #include "athena/extensions/shell/athena_shell_app_window_client.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "extensions/common/extension_set.h" 9 #include "extensions/common/extension_set.h"
10 #include "extensions/shell/browser/shell_extension_system.h" 10 #include "extensions/shell/browser/shell_extension_system.h"
11 11
12 namespace athena { 12 namespace athena {
13 namespace { 13 namespace {
14 14
15 class ShellExtensionsDelegate : public ExtensionsDelegate { 15 class ShellExtensionsDelegate : public ExtensionsDelegate {
16 public: 16 public:
17 explicit ShellExtensionsDelegate(content::BrowserContext* context) 17 explicit ShellExtensionsDelegate(content::BrowserContext* context)
18 : context_(context), 18 : context_(context),
19 extension_system_(static_cast<extensions::ShellExtensionSystem*>( 19 extension_system_(static_cast<extensions::ShellExtensionSystem*>(
20 extensions::ExtensionSystem::Get(context))), 20 extensions::ExtensionSystem::Get(context))) {
21 app_window_client_(context) {
22 extensions::AppWindowClient::Set(&app_window_client_); 21 extensions::AppWindowClient::Set(&app_window_client_);
23 } 22 }
24 23
25 virtual ~ShellExtensionsDelegate() { extensions::AppWindowClient::Set(NULL); } 24 virtual ~ShellExtensionsDelegate() { extensions::AppWindowClient::Set(NULL); }
26 25
27 private: 26 private:
28 // ExtensionsDelegate: 27 // ExtensionsDelegate:
29 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE { 28 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE {
30 return context_; 29 return context_;
31 } 30 }
(...skipping 21 matching lines...) Expand all
53 52
54 } // namespace 53 } // namespace
55 54
56 // static 55 // static
57 void ExtensionsDelegate::CreateExtensionsDelegateForShell( 56 void ExtensionsDelegate::CreateExtensionsDelegateForShell(
58 content::BrowserContext* context) { 57 content::BrowserContext* context) {
59 new ShellExtensionsDelegate(context); 58 new ShellExtensionsDelegate(context);
60 } 59 }
61 60
62 } // namespace athena 61 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698