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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl.cc

Issue 12475002: Delete memory manager dead code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve against CrOS changes Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gpu/gpu_data_manager_impl.h" 5 #include "content/browser/gpu/gpu_data_manager_impl.h"
6 6
7 #if defined(OS_MACOSX) 7 #if defined(OS_MACOSX)
8 #include <ApplicationServices/ApplicationServices.h> 8 #include <ApplicationServices/ApplicationServices.h>
9 #endif // OS_MACOSX 9 #endif // OS_MACOSX
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 void GpuDataManagerImpl::AddObserver(GpuDataManagerObserver* observer) { 201 void GpuDataManagerImpl::AddObserver(GpuDataManagerObserver* observer) {
202 observer_list_->AddObserver(observer); 202 observer_list_->AddObserver(observer);
203 } 203 }
204 204
205 void GpuDataManagerImpl::RemoveObserver(GpuDataManagerObserver* observer) { 205 void GpuDataManagerImpl::RemoveObserver(GpuDataManagerObserver* observer) {
206 observer_list_->RemoveObserver(observer); 206 observer_list_->RemoveObserver(observer);
207 } 207 }
208 208
209 void GpuDataManagerImpl::SetWindowCount(uint32 count) {
210 {
211 base::AutoLock auto_lock(gpu_info_lock_);
212 window_count_ = count;
213 }
214 GpuProcessHost::SendOnIO(
215 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
216 CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
217 new GpuMsg_SetVideoMemoryWindowCount(count));
218 }
219
220 uint32 GpuDataManagerImpl::GetWindowCount() const {
221 base::AutoLock auto_lock(gpu_info_lock_);
222 return window_count_;
223 }
224
225 void GpuDataManagerImpl::UnblockDomainFrom3DAPIs(const GURL& url) { 209 void GpuDataManagerImpl::UnblockDomainFrom3DAPIs(const GURL& url) {
226 // This method must do two things: 210 // This method must do two things:
227 // 211 //
228 // 1. If the specific domain is blocked, then unblock it. 212 // 1. If the specific domain is blocked, then unblock it.
229 // 213 //
230 // 2. Reset our notion of how many GPU resets have occurred recently. 214 // 2. Reset our notion of how many GPU resets have occurred recently.
231 // This is necessary even if the specific domain was blocked. 215 // This is necessary even if the specific domain was blocked.
232 // Otherwise, if we call Are3DAPIsBlocked with the same domain right 216 // Otherwise, if we call Are3DAPIsBlocked with the same domain right
233 // after unblocking it, it will probably still be blocked because of 217 // after unblocking it, it will probably still be blocked because of
234 // the recent GPU reset caused by that domain. 218 // the recent GPU reset caused by that domain.
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 790
807 void GpuDataManagerImpl::Notify3DAPIBlocked(const GURL& url, 791 void GpuDataManagerImpl::Notify3DAPIBlocked(const GURL& url,
808 int render_process_id, 792 int render_process_id,
809 int render_view_id, 793 int render_view_id,
810 ThreeDAPIType requester) { 794 ThreeDAPIType requester) {
811 observer_list_->Notify(&GpuDataManagerObserver::DidBlock3DAPIs, 795 observer_list_->Notify(&GpuDataManagerObserver::DidBlock3DAPIs,
812 url, render_process_id, render_view_id, requester); 796 url, render_process_id, render_view_id, requester);
813 } 797 }
814 798
815 } // namespace content 799 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698