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

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

Issue 755643004: Replace SystemUIResourceManager with ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clang build failure Created 6 years 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 | « ui/base/BUILD.gn ('k') | ui/base/android/window_android_compositor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_
6 #define UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_
7
8 #include "cc/resources/ui_resource_client.h"
9 #include "ui/base/android/system_ui_resource_type.h"
10 #include "ui/base/ui_base_export.h"
11
12 namespace ui {
13
14 // Interface for loading and accessing shared system UI resources.
15 class UI_BASE_EXPORT SystemUIResourceManager {
16 public:
17 virtual ~SystemUIResourceManager() {}
18
19 // Optionally trigger bitmap loading for a given |resource|, if necessary.
20 // Note that this operation may be asynchronous, and subsequent queries to
21 // |GetUIResourceId()| will yield a valid result only after loading finishes.
22 // This method is particularly useful for idly loading a resource before an
23 // explicit cc::UIResourceId is required. Repeated calls will be ignored.
24 virtual void PreloadResource(SystemUIResourceType resource) = 0;
25
26 // Return the resource id associated with |resource|. If loading hasn't yet
27 // begun for the given |resource|, it will be triggered immediately. If
28 // loading is asynchronous, 0 will be returned until loading has finished, and
29 // the caller is responsible for re-querying until a valid id is returned.
30 virtual cc::UIResourceId GetUIResourceId(SystemUIResourceType resource) = 0;
31 };
32
33 } // namespace ui
34
35 #endif // UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/android/window_android_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698