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

Unified Diff: content/renderer/gpu/transport_texture_host.cc

Issue 9028009: base::Bind: Remove callback_old.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Actually remove callback_old.h Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/gpu/transport_texture_host.h ('k') | media/base/pipeline_status.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/transport_texture_host.cc
diff --git a/content/renderer/gpu/transport_texture_host.cc b/content/renderer/gpu/transport_texture_host.cc
index 11fe9f7997d34a9ea00245e25b6e7c13345384a3..87ed4b15a980e24dd99a2064ab715888bac8d159 100644
--- a/content/renderer/gpu/transport_texture_host.cc
+++ b/content/renderer/gpu/transport_texture_host.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -65,11 +65,11 @@ void TransportTextureHost::Destroy() {
service_->RemoveRoute(host_id_);
}
-void TransportTextureHost::GetTextures(TextureUpdateCallback* callback,
- std::vector<int>* textures) {
+void TransportTextureHost::GetTextures(
+ const TextureUpdateCallback& callback, std::vector<int>* textures) {
textures->resize(textures_.size());
std::copy(textures_.begin(), textures_.end(), textures->begin());
- update_callback_.reset(callback);
+ update_callback_ = callback;
}
int TransportTextureHost::GetPeerId() {
@@ -187,8 +187,8 @@ void TransportTextureHost::OnReleaseTextures() {
}
void TransportTextureHost::OnTextureUpdated(int texture_id) {
- if (update_callback_.get())
- update_callback_->Run(texture_id);
+ if (!update_callback_.is_null())
+ update_callback_.Run(texture_id);
}
#endif
« no previous file with comments | « content/renderer/gpu/transport_texture_host.h ('k') | media/base/pipeline_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698