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

Unified Diff: chrome/browser/plugins/plugin_power_saver_browsertest.cc

Issue 2702093002: Consistent CopyFromSurface() API, consolidated to RWHV (Closed)
Patch Set: REBASE Created 3 years, 10 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 | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/thumbnails/simple_thumbnail_crop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_power_saver_browsertest.cc
diff --git a/chrome/browser/plugins/plugin_power_saver_browsertest.cc b/chrome/browser/plugins/plugin_power_saver_browsertest.cc
index c60a6ee130b6dde35df22ae9f5f8787ee975cff1..e688838a30544df4208105ede29aa157199e66ce 100644
--- a/chrome/browser/plugins/plugin_power_saver_browsertest.cc
+++ b/chrome/browser/plugins/plugin_power_saver_browsertest.cc
@@ -28,6 +28,7 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
+#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
@@ -366,13 +367,13 @@ class PluginPowerSaverBrowserTest : public InProcessBrowserTest {
content::RenderWidgetHost* rwh =
GetActiveWebContents()->GetRenderViewHost()->GetWidget();
- if (!rwh->CanCopyFromBackingStore()) {
- ADD_FAILURE() << "Could not copy from backing store.";
+ if (!rwh->GetView() || !rwh->GetView()->IsSurfaceAvailableForCopy()) {
+ ADD_FAILURE() << "RWHV surface not available for copy.";
return false;
}
bool snapshot_matches = false;
- rwh->CopyFromBackingStore(
+ rwh->GetView()->CopyFromSurface(
gfx::Rect(), gfx::Size(),
base::Bind(&CompareSnapshotToReference, reference, &snapshot_matches,
base::MessageLoop::QuitWhenIdleClosure()),
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/thumbnails/simple_thumbnail_crop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698