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

Unified Diff: ash/wm/partial_screenshot_view.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 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 | « ash/system/drive/tray_drive.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/partial_screenshot_view.cc
diff --git a/ash/wm/partial_screenshot_view.cc b/ash/wm/partial_screenshot_view.cc
index dd0bd1da0ac94148cada909d418ff7ac6b6692d5..a02ca7ef50405e91bc99bc7900b5912983566048 100644
--- a/ash/wm/partial_screenshot_view.cc
+++ b/ash/wm/partial_screenshot_view.cc
@@ -121,10 +121,9 @@ void PartialScreenshotView::OnMouseReleased(const ui::MouseEvent& event) {
is_dragging_ = false;
if (screenshot_delegate_) {
aura::RootWindow *root_window = Shell::GetPrimaryRootWindow();
- gfx::Rect root_window_screenshot_rect = root_window->bounds();
- root_window_screenshot_rect.Intersect(GetScreenshotRect());
screenshot_delegate_->HandleTakePartialScreenshot(
- root_window, root_window_screenshot_rect);
+ root_window,
+ gfx::IntersectRects(root_window->bounds(), GetScreenshotRect()));
}
}
« no previous file with comments | « ash/system/drive/tray_drive.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698