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

Side by Side Diff: content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc

Issue 2538853002: Media Remoting: Draw remoting interstitial on poster image. (Closed)
Patch Set: Addressed nasko's comments. Created 3 years, 11 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 (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/renderer/fetchers/multi_resolution_image_resource_fetcher.h" 5 #include "content/renderer/fetchers/multi_resolution_image_resource_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "content/child/image_decoder.h" 9 #include "content/child/image_decoder.h"
10 #include "content/public/renderer/associated_resource_fetcher.h" 10 #include "content/public/renderer/associated_resource_fetcher.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } // else case: 74 } // else case:
75 // If we get here, it means no image from server or couldn't decode the 75 // If we get here, it means no image from server or couldn't decode the
76 // response as an image. The delegate will see an empty vector. 76 // response as an image. The delegate will see an empty vector.
77 77
78 // Take a reference to the callback as running the callback may lead to our 78 // Take a reference to the callback as running the callback may lead to our
79 // destruction. 79 // destruction.
80 Callback callback = callback_; 80 Callback callback = callback_;
81 callback.Run(this, bitmaps); 81 callback.Run(this, bitmaps);
82 } 82 }
83 83
84 void MultiResolutionImageResourceFetcher::OnRenderFrameDestruct() {
85 // Take a reference to the callback as running the callback may lead to our
86 // destruction.
87 Callback callback = callback_;
88 callback.Run(this, std::vector<SkBitmap>());
89 }
90
84 } // namespace content 91 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698