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