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

Side by Side Diff: content/browser/android/ui_resource_provider_impl.cc

Issue 454863003: Revert of [Android] Use UIResource for overscroll glow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 #include "content/browser/android/ui_resource_provider_impl.h" 5 #include "content/browser/android/ui_resource_provider_impl.h"
6 6
7 #include "cc/resources/ui_resource_client.h" 7 #include "cc/resources/ui_resource_client.h"
8 #include "cc/trees/layer_tree_host.h" 8 #include "cc/trees/layer_tree_host.h"
9 #include "content/public/browser/android/ui_resource_client_android.h" 9 #include "content/public/browser/android/ui_resource_client_android.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 UIResourceProviderImpl::UIResourceProviderImpl() 13 UIResourceProviderImpl::UIResourceProviderImpl() : host_(NULL) {
14 : system_ui_resource_manager_(this), host_(NULL) {
15 } 14 }
16 15
17 UIResourceProviderImpl::~UIResourceProviderImpl() { 16 UIResourceProviderImpl::~UIResourceProviderImpl() {
18 SetLayerTreeHost(NULL); 17 SetLayerTreeHost(NULL);
19 } 18 }
20 19
21 void UIResourceProviderImpl::SetLayerTreeHost(cc::LayerTreeHost* host) { 20 void UIResourceProviderImpl::SetLayerTreeHost(cc::LayerTreeHost* host) {
22 if (host_ == host) 21 if (host_ == host)
23 return; 22 return;
24 host_ = host; 23 host_ = host;
(...skipping 26 matching lines...) Expand all
51 ui_resource_client_map_.find(ui_resource_id); 50 ui_resource_client_map_.find(ui_resource_id);
52 DCHECK(iter != ui_resource_client_map_.end()); 51 DCHECK(iter != ui_resource_client_map_.end());
53 52
54 ui_resource_client_map_.erase(iter); 53 ui_resource_client_map_.erase(iter);
55 54
56 if (!host_) 55 if (!host_)
57 return; 56 return;
58 host_->DeleteUIResource(ui_resource_id); 57 host_->DeleteUIResource(ui_resource_id);
59 } 58 }
60 59
61 ui::SystemUIResourceManager&
62 UIResourceProviderImpl::GetSystemUIResourceManager() {
63 return system_ui_resource_manager_;
64 }
65
66 } // namespace content 60 } // namespace content
OLDNEW
« 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