Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: ui/base/android/system_ui_resource_manager.h

Issue 367173003: [Android] Implementation of overscroll effect for Android L (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/input/input_handler_proxy_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_ 5 #ifndef UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_
6 #define UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_ 6 #define UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_
7 7
8 #include "cc/resources/ui_resource_client.h" 8 #include "cc/resources/ui_resource_client.h"
9 #include "ui/base/ui_base_export.h" 9 #include "ui/base/ui_base_export.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 // Interface for loading and accessing shared system UI resources. 13 // Interface for loading and accessing shared system UI resources.
14 class UI_BASE_EXPORT SystemUIResourceManager { 14 class UI_BASE_EXPORT SystemUIResourceManager {
15 public: 15 public:
16 enum ResourceType { 16 enum ResourceType {
17 OVERSCROLL_EDGE = 0, 17 OVERSCROLL_EDGE = 0,
18 OVERSCROLL_GLOW, 18 OVERSCROLL_GLOW,
19 OVERSCROLL_GLOW_L,
19 RESOURCE_TYPE_FIRST = OVERSCROLL_EDGE, 20 RESOURCE_TYPE_FIRST = OVERSCROLL_EDGE,
20 RESOURCE_TYPE_LAST = OVERSCROLL_GLOW 21 RESOURCE_TYPE_LAST = OVERSCROLL_GLOW_L
21 }; 22 };
22 23
23 virtual ~SystemUIResourceManager() {} 24 virtual ~SystemUIResourceManager() {}
24 25
25 // Optionally trigger bitmap loading for a given |resource|, if necessary. 26 // Optionally trigger bitmap loading for a given |resource|, if necessary.
26 // Note that this operation may be asynchronous, and subsequent queries to 27 // Note that this operation may be asynchronous, and subsequent queries to
27 // |GetUIResourceId()| will yield a valid result only after loading finishes. 28 // |GetUIResourceId()| will yield a valid result only after loading finishes.
28 // This method is particularly useful for idly loading a resource before an 29 // This method is particularly useful for idly loading a resource before an
29 // explicit cc::UIResourceId is required. Repeated calls will be ignored. 30 // explicit cc::UIResourceId is required. Repeated calls will be ignored.
30 virtual void PreloadResource(ResourceType resource) = 0; 31 virtual void PreloadResource(ResourceType resource) = 0;
31 32
32 // Return the resource id associated with |resource|. If loading hasn't yet 33 // Return the resource id associated with |resource|. If loading hasn't yet
33 // begun for the given |resource|, it will be triggered immediately. If 34 // begun for the given |resource|, it will be triggered immediately. If
34 // loading is asynchronous, 0 will be returned until loading has finished, and 35 // loading is asynchronous, 0 will be returned until loading has finished, and
35 // the caller is responsible for re-querying until a valid id is returned. 36 // the caller is responsible for re-querying until a valid id is returned.
36 virtual cc::UIResourceId GetUIResourceId(ResourceType resource) = 0; 37 virtual cc::UIResourceId GetUIResourceId(ResourceType resource) = 0;
37 }; 38 };
38 39
39 } // namespace ui 40 } // namespace ui
40 41
41 #endif // UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_ 42 #endif // UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_proxy_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698