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/api/system_info/system_info_api.h" | 5 #include "chrome/browser/extensions/api/system_info/system_info_api.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/extensions/api/system_storage/storage_info_provider.h" | 16 #include "chrome/browser/extensions/api/system_storage/storage_info_provider.h" |
17 #include "chrome/browser/extensions/event_router_forwarder.h" | 17 #include "chrome/browser/extensions/event_router_forwarder.h" |
18 #include "chrome/browser/storage_monitor/removable_storage_observer.h" | 18 #include "chrome/browser/storage_monitor/removable_storage_observer.h" |
19 #include "chrome/browser/storage_monitor/storage_info.h" | 19 #include "chrome/browser/storage_monitor/storage_info.h" |
20 #include "chrome/browser/storage_monitor/storage_monitor.h" | 20 #include "chrome/browser/storage_monitor/storage_monitor.h" |
21 #include "chrome/common/extensions/api/system_display.h" | 21 #include "chrome/common/extensions/api/system_display.h" |
22 #include "chrome/common/extensions/api/system_storage.h" | 22 #include "chrome/common/extensions/api/system_storage.h" |
23 #include "ui/gfx/display_observer.h" | 23 #include "ui/gfx/display_observer.h" |
24 | 24 |
25 #if defined(USE_ASH) | 25 #if defined(USE_ASH) |
26 #include "ash/screen_ash.h" | |
27 #include "ash/shell.h" | 26 #include "ash/shell.h" |
27 #include "ui/gfx/screen.h" | |
Jun Mukai
2014/01/15 19:20:15
You can put ui/gfx/screen.h outside of USE_ASH rig
oshima
2014/01/15 19:42:51
I can, but shouldn't because it is used only in US
| |
28 #endif | 28 #endif |
29 | 29 |
30 namespace extensions { | 30 namespace extensions { |
31 | 31 |
32 using api::system_storage::StorageUnitInfo; | 32 using api::system_storage::StorageUnitInfo; |
33 using content::BrowserThread; | 33 using content::BrowserThread; |
34 | 34 |
35 namespace system_display = api::system_display; | 35 namespace system_display = api::system_display; |
36 namespace system_storage = api::system_storage; | 36 namespace system_storage = api::system_storage; |
37 | 37 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 | 201 |
202 void SystemInfoAPI::OnListenerAdded(const EventListenerInfo& details) { | 202 void SystemInfoAPI::OnListenerAdded(const EventListenerInfo& details) { |
203 SystemInfoEventRouter::GetInstance()->AddEventListener(details.event_name); | 203 SystemInfoEventRouter::GetInstance()->AddEventListener(details.event_name); |
204 } | 204 } |
205 | 205 |
206 void SystemInfoAPI::OnListenerRemoved(const EventListenerInfo& details) { | 206 void SystemInfoAPI::OnListenerRemoved(const EventListenerInfo& details) { |
207 SystemInfoEventRouter::GetInstance()->RemoveEventListener(details.event_name); | 207 SystemInfoEventRouter::GetInstance()->RemoveEventListener(details.event_name); |
208 } | 208 } |
209 | 209 |
210 } // namespace extensions | 210 } // namespace extensions |
OLD | NEW |