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

Unified Diff: ui/window_snapshot/window_snapshot_mac.mm

Issue 10821104: Support GrabWindowSnapshot with no g_browser_process (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: SaveScreenSnapshotToDirectory uses ui::GrabWindowSnapshot Created 8 years, 5 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
Index: ui/window_snapshot/window_snapshot_mac.mm
diff --git a/chrome/browser/ui/window_snapshot/window_snapshot_mac.mm b/ui/window_snapshot/window_snapshot_mac.mm
similarity index 86%
rename from chrome/browser/ui/window_snapshot/window_snapshot_mac.mm
rename to ui/window_snapshot/window_snapshot_mac.mm
index ba4aef79df6ea9b8c96c39ef43aa44f7c8a51c95..5930952d78b05897f01e85a0ca662c95b06eb6c4 100644
--- a/chrome/browser/ui/window_snapshot/window_snapshot_mac.mm
+++ b/ui/window_snapshot/window_snapshot_mac.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/window_snapshot/window_snapshot.h"
+#include "ui/window_snapshot/window_snapshot.h"
#import <Cocoa/Cocoa.h>
@@ -11,11 +11,11 @@
#include "base/memory/scoped_nsobject.h"
#include "ui/gfx/rect.h"
-namespace chrome {
+namespace ui {
-bool GrabWindowSnapshotImpl(gfx::NativeWindow window,
- std::vector<unsigned char>* png_representation,
- const gfx::Rect& snapshot_bounds) {
+bool GrabWindowSnapshot(gfx::NativeWindow window,
+ std::vector<unsigned char>* png_representation,
+ const gfx::Rect& snapshot_bounds) {
NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
gfx::Rect screen_bounds = gfx::Rect(NSRectToCGRect([screen frame]));
gfx::Rect window_bounds = gfx::Rect(NSRectToCGRect([window frame]));
@@ -58,4 +58,4 @@ bool GrabWindowSnapshotImpl(gfx::NativeWindow window,
return true;
}
-} // namespace chrome
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698