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

Unified Diff: chrome/browser/ui/webui/bug_report_ui.cc

Issue 8523022: Change snasphotting API to take in a bounds Rect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nicer diff Created 9 years, 1 month 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 | « no previous file | chrome/browser/ui/window_snapshot/window_snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/bug_report_ui.cc
diff --git a/chrome/browser/ui/webui/bug_report_ui.cc b/chrome/browser/ui/webui/bug_report_ui.cc
index d9abc7e72259f7849e5f585d1a9b37e337fb25e0..e7b0c891fb64546c041c9d27ab08401debd31443 100644
--- a/chrome/browser/ui/webui/bug_report_ui.cc
+++ b/chrome/browser/ui/webui/bug_report_ui.cc
@@ -139,8 +139,11 @@ void ShowHtmlBugReportView(Browser* browser,
last_screenshot_png->clear();
gfx::NativeWindow native_window = browser->window()->GetNativeHandle();
- BugReportUtil::SetScreenshotSize(
- browser::GrabWindowSnapshot(native_window, last_screenshot_png));
+ gfx::Rect snapshot_bounds = gfx::Rect(browser->window()->GetBounds().size());
+ bool success = browser::GrabWindowSnapshot(native_window,
+ last_screenshot_png,
+ snapshot_bounds);
+ BugReportUtil::SetScreenshotSize(success ? snapshot_bounds : gfx::Rect());
std::string bug_report_url = std::string(chrome::kChromeUIBugReportURL) +
"#" + base::IntToString(browser->active_index()) +
« no previous file with comments | « no previous file | chrome/browser/ui/window_snapshot/window_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698