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

Unified Diff: chrome/browser/ui/cocoa/bug_report_window_controller.mm

Issue 6386009: Remove app/win/win_util.h,cc etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with NSApp changes in r73581 Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/gtk/browser_window_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bug_report_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/bug_report_window_controller.mm b/chrome/browser/ui/cocoa/bug_report_window_controller.mm
index c55954c8fbdcf0194e2d629fa6d651cddfdc0606..b323379cba8687415c098a37633156024ab2fdfe 100644
--- a/chrome/browser/ui/cocoa/bug_report_window_controller.mm
+++ b/chrome/browser/ui/cocoa/bug_report_window_controller.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -9,6 +9,7 @@
#include "chrome/browser/bug_report_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
+#include "chrome/browser/ui/window_snapshot/window_snapshot.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
@@ -41,6 +42,9 @@
l10n_util::GetNSStringWithFixup(IDS_BUGREPORT_OTHER_PROBLEM),
nil];
+ pngHeight_ = 0;
+ pngWidth_ = 0;
+
if (currentTab_ != NULL) {
// Get data from current tab, if one exists. This dialog could be called
// from the main menu with no tab contents, so currentTab_ is not
@@ -62,18 +66,16 @@
[self setPageURL:base::SysUTF8ToNSString(
currentTab_->controller().GetActiveEntry()->url().spec())];
[self setPageTitle:base::SysUTF16ToNSString(currentTab_->GetTitle())];
- base::mac::GrabWindowSnapshot(
- currentTab_->view()->GetTopLevelNativeWindow(), &pngData_,
- &pngWidth_, &pngHeight_);
+ gfx::Rect pngRect = browser::GrabWindowSnapshot(
+ currentTab_->view()->GetTopLevelNativeWindow(), &pngData_);
+ pngWidth_ = pngRect.width();
+ pngHeight_ = pngRect.height();
} else {
// If no current tab exists, create a menu without the "broken page"
// options, with page URL and title empty, and screenshot disabled.
[self setSendScreenshot:NO];
[self setDisableScreenshotCheckbox:YES];
}
-
- pngHeight_ = 0;
- pngWidth_ = 0;
}
return self;
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/gtk/browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698