| OLD | NEW |
| 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 #ifndef CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "content/browser/android/system_ui_resource_manager_impl.h" | |
| 10 #include "content/public/browser/android/ui_resource_provider.h" | 9 #include "content/public/browser/android/ui_resource_provider.h" |
| 11 | 10 |
| 12 namespace cc { | 11 namespace cc { |
| 13 class LayerTreeHost; | 12 class LayerTreeHost; |
| 14 } | 13 } |
| 15 | 14 |
| 16 namespace content { | 15 namespace content { |
| 17 | 16 |
| 18 class UIResourceClientAndroid; | 17 class UIResourceClientAndroid; |
| 19 | 18 |
| 20 class UIResourceProviderImpl : public UIResourceProvider { | 19 class UIResourceProviderImpl : public UIResourceProvider { |
| 21 public: | 20 public: |
| 22 UIResourceProviderImpl(); | 21 UIResourceProviderImpl(); |
| 23 | 22 |
| 24 virtual ~UIResourceProviderImpl(); | 23 virtual ~UIResourceProviderImpl(); |
| 25 | 24 |
| 26 void SetLayerTreeHost(cc::LayerTreeHost* host); | 25 void SetLayerTreeHost(cc::LayerTreeHost* host); |
| 27 | 26 |
| 28 void UIResourcesAreInvalid(); | 27 void UIResourcesAreInvalid(); |
| 29 | 28 |
| 30 virtual cc::UIResourceId CreateUIResource( | 29 virtual cc::UIResourceId CreateUIResource( |
| 31 UIResourceClientAndroid* client) OVERRIDE; | 30 UIResourceClientAndroid* client) OVERRIDE; |
| 32 | 31 |
| 33 virtual void DeleteUIResource(cc::UIResourceId resource_id) OVERRIDE; | 32 virtual void DeleteUIResource(cc::UIResourceId resource_id) OVERRIDE; |
| 34 | 33 |
| 35 ui::SystemUIResourceManager& GetSystemUIResourceManager(); | |
| 36 | |
| 37 private: | 34 private: |
| 38 typedef base::hash_map<cc::UIResourceId, UIResourceClientAndroid*> | 35 typedef base::hash_map<cc::UIResourceId, UIResourceClientAndroid*> |
| 39 UIResourceClientMap; | 36 UIResourceClientMap; |
| 40 UIResourceClientMap ui_resource_client_map_; | 37 UIResourceClientMap ui_resource_client_map_; |
| 41 SystemUIResourceManagerImpl system_ui_resource_manager_; | 38 |
| 42 cc::LayerTreeHost* host_; | 39 cc::LayerTreeHost* host_; |
| 43 | 40 |
| 44 DISALLOW_COPY_AND_ASSIGN(UIResourceProviderImpl); | 41 DISALLOW_COPY_AND_ASSIGN(UIResourceProviderImpl); |
| 45 }; | 42 }; |
| 46 | 43 |
| 47 } // namespace content | 44 } // namespace content |
| 48 | 45 |
| 49 #endif // CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_ | 46 #endif // CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_ |
| OLD | NEW |