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

Unified Diff: content/browser/android/ui_resource_provider_impl.cc

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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/ui_resource_provider_impl.cc
diff --git a/content/browser/android/ui_resource_provider_impl.cc b/content/browser/android/ui_resource_provider_impl.cc
deleted file mode 100644
index cd45d7cc634d160e56ce9ddc67cde910ab834f0f..0000000000000000000000000000000000000000
--- a/content/browser/android/ui_resource_provider_impl.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/android/ui_resource_provider_impl.h"
-
-#include "cc/resources/ui_resource_client.h"
-#include "cc/trees/layer_tree_host.h"
-#include "content/public/browser/android/ui_resource_client_android.h"
-
-namespace content {
-
-UIResourceProviderImpl::UIResourceProviderImpl()
- : system_ui_resource_manager_(this), host_(NULL),
- supports_etc1_npot_(false) {
-
-}
-
-UIResourceProviderImpl::~UIResourceProviderImpl() {
- SetLayerTreeHost(NULL);
-}
-
-void UIResourceProviderImpl::SetLayerTreeHost(cc::LayerTreeHost* host) {
- if (host_ == host)
- return;
- host_ = host;
- UIResourcesAreInvalid();
-}
-
-void UIResourceProviderImpl::UIResourcesAreInvalid() {
- UIResourceClientMap client_map = ui_resource_client_map_;
- ui_resource_client_map_.clear();
- for (UIResourceClientMap::iterator iter = client_map.begin();
- iter != client_map.end();
- iter++) {
- iter->second->UIResourceIsInvalid();
- }
-}
-
-cc::UIResourceId UIResourceProviderImpl::CreateUIResource(
- UIResourceClientAndroid* client) {
- if (!host_)
- return 0;
- cc::UIResourceId id = host_->CreateUIResource(client);
- DCHECK(ui_resource_client_map_.find(id) == ui_resource_client_map_.end());
-
- ui_resource_client_map_[id] = client;
- return id;
-}
-
-void UIResourceProviderImpl::DeleteUIResource(cc::UIResourceId ui_resource_id) {
- UIResourceClientMap::iterator iter =
- ui_resource_client_map_.find(ui_resource_id);
- DCHECK(iter != ui_resource_client_map_.end());
-
- ui_resource_client_map_.erase(iter);
-
- if (!host_)
- return;
- host_->DeleteUIResource(ui_resource_id);
-}
-
-ui::SystemUIResourceManager&
-UIResourceProviderImpl::GetSystemUIResourceManager() {
- return system_ui_resource_manager_;
-}
-
-bool UIResourceProviderImpl::SupportsETC1NonPowerOfTwo() const {
- return supports_etc1_npot_;
-}
-
-} // namespace content
« no previous file with comments | « content/browser/android/ui_resource_provider_impl.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698