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

Side by Side Diff: content/browser/devtools/protocol/page_handler.cc

Issue 2871113002: Change from_surface default value to true (Closed)
Patch Set: revert to defaulting to true Created 3 years, 7 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
« no previous file with comments | « no previous file | headless/app/headless_shell.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 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/devtools/protocol/page_handler.h" 5 #include "content/browser/devtools/protocol/page_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 return; 289 return;
290 } 290 }
291 291
292 std::string screenshot_format = format.fromMaybe(kPng); 292 std::string screenshot_format = format.fromMaybe(kPng);
293 int screenshot_quality = quality.fromMaybe(kDefaultScreenshotQuality); 293 int screenshot_quality = quality.fromMaybe(kDefaultScreenshotQuality);
294 294
295 host_->GetRenderWidgetHost()->GetSnapshotFromBrowser( 295 host_->GetRenderWidgetHost()->GetSnapshotFromBrowser(
296 base::Bind(&PageHandler::ScreenshotCaptured, weak_factory_.GetWeakPtr(), 296 base::Bind(&PageHandler::ScreenshotCaptured, weak_factory_.GetWeakPtr(),
297 base::Passed(std::move(callback)), screenshot_format, 297 base::Passed(std::move(callback)), screenshot_format,
298 screenshot_quality), 298 screenshot_quality),
299 from_surface.fromMaybe(false)); 299 from_surface.fromMaybe(true));
300 } 300 }
301 301
302 void PageHandler::PrintToPDF(Maybe<bool> landscape, 302 void PageHandler::PrintToPDF(Maybe<bool> landscape,
303 Maybe<bool> display_header_footer, 303 Maybe<bool> display_header_footer,
304 Maybe<bool> print_background, 304 Maybe<bool> print_background,
305 Maybe<double> scale, 305 Maybe<double> scale,
306 Maybe<double> paper_width, 306 Maybe<double> paper_width,
307 Maybe<double> paper_height, 307 Maybe<double> paper_height,
308 Maybe<double> margin_top, 308 Maybe<double> margin_top,
309 Maybe<double> margin_bottom, 309 Maybe<double> margin_bottom,
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 Response PageHandler::StopLoading() { 586 Response PageHandler::StopLoading() {
587 WebContentsImpl* web_contents = GetWebContents(); 587 WebContentsImpl* web_contents = GetWebContents();
588 if (!web_contents) 588 if (!web_contents)
589 return Response::InternalError(); 589 return Response::InternalError();
590 web_contents->Stop(); 590 web_contents->Stop();
591 return Response::OK(); 591 return Response::OK();
592 } 592 }
593 593
594 } // namespace protocol 594 } // namespace protocol
595 } // namespace content 595 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | headless/app/headless_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698