OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/chrome_extensions_browser_client.h" | 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/extensions/chrome_notification_observer.h" |
9 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/profiles/profile_manager.h" | 11 #include "chrome/browser/profiles/profile_manager.h" |
11 #include "chrome/browser/ui/browser_finder.h" | 12 #include "chrome/browser/ui/browser_finder.h" |
12 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
13 | 14 |
14 namespace extensions { | 15 namespace extensions { |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 static base::LazyInstance<ChromeExtensionsBrowserClient> g_client = | 19 static base::LazyInstance<ChromeExtensionsBrowserClient> g_client = |
19 LAZY_INSTANCE_INITIALIZER; | 20 LAZY_INSTANCE_INITIALIZER; |
20 | 21 |
21 } // namespace | 22 } // namespace |
22 | 23 |
23 ChromeExtensionsBrowserClient::ChromeExtensionsBrowserClient() {} | 24 ChromeExtensionsBrowserClient::ChromeExtensionsBrowserClient() |
| 25 : notification_observer_(new ChromeNotificationObserver) {} |
24 | 26 |
25 ChromeExtensionsBrowserClient::~ChromeExtensionsBrowserClient() {} | 27 ChromeExtensionsBrowserClient::~ChromeExtensionsBrowserClient() {} |
26 | 28 |
27 bool ChromeExtensionsBrowserClient::IsShuttingDown() { | 29 bool ChromeExtensionsBrowserClient::IsShuttingDown() { |
28 return g_browser_process->IsShuttingDown(); | 30 return g_browser_process->IsShuttingDown(); |
29 } | 31 } |
30 | 32 |
31 bool ChromeExtensionsBrowserClient::IsSameContext( | 33 bool ChromeExtensionsBrowserClient::IsSameContext( |
32 content::BrowserContext* first, | 34 content::BrowserContext* first, |
33 content::BrowserContext* second) { | 35 content::BrowserContext* second) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowAppList); | 71 CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowAppList); |
70 #endif | 72 #endif |
71 } | 73 } |
72 | 74 |
73 // static | 75 // static |
74 ChromeExtensionsBrowserClient* ChromeExtensionsBrowserClient::GetInstance() { | 76 ChromeExtensionsBrowserClient* ChromeExtensionsBrowserClient::GetInstance() { |
75 return g_client.Pointer(); | 77 return g_client.Pointer(); |
76 } | 78 } |
77 | 79 |
78 } // namespace extensions | 80 } // namespace extensions |
OLD | NEW |