| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
| 15 #include "base/task.h" | 15 #include "base/task.h" |
| 16 | 16 |
| 17 class ChromeURLDataManagerBackend; | 17 class ChromeURLDataManagerBackend; |
| 18 class FilePath; | |
| 19 class MessageLoop; | 18 class MessageLoop; |
| 20 class Profile; | |
| 21 class RefCountedMemory; | 19 class RefCountedMemory; |
| 22 | 20 |
| 23 namespace base { | 21 namespace base { |
| 24 class DictionaryValue; | 22 class DictionaryValue; |
| 25 } | 23 } |
| 26 | 24 |
| 27 // To serve dynamic data off of chrome: URLs, implement the | 25 // To serve dynamic data off of chrome: URLs, implement the |
| 28 // ChromeURLDataManager::DataSource interface and register your handler | 26 // ChromeURLDataManager::DataSource interface and register your handler |
| 29 // with AddDataSource. DataSources must be added on the UI thread (they are also | 27 // with AddDataSource. DataSources must be added on the UI thread (they are also |
| 30 // deleted on the UI thread). Internally the DataSources are maintained by | 28 // deleted on the UI thread). Internally the DataSources are maintained by |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // Lock used when accessing |data_sources_|. | 180 // Lock used when accessing |data_sources_|. |
| 183 static base::Lock delete_lock_; | 181 static base::Lock delete_lock_; |
| 184 | 182 |
| 185 // |data_sources_| that are no longer referenced and scheduled for deletion. | 183 // |data_sources_| that are no longer referenced and scheduled for deletion. |
| 186 static DataSources* data_sources_; | 184 static DataSources* data_sources_; |
| 187 | 185 |
| 188 DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManager); | 186 DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManager); |
| 189 }; | 187 }; |
| 190 | 188 |
| 191 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ | 189 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_H_ |
| OLD | NEW |