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

Side by Side Diff: ash/wm/partial_screenshot_view.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/screen_dimmer_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/partial_screenshot_view.h" 5 #include "ash/wm/partial_screenshot_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/display/mouse_cursor_event_filter.h" 9 #include "ash/display/mouse_cursor_event_filter.h"
10 #include "ash/screenshot_delegate.h" 10 #include "ash/screenshot_delegate.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 is_dragging_ = true; 156 is_dragging_ = true;
157 } 157 }
158 158
159 void PartialScreenshotView::OnSelectionFinished() { 159 void PartialScreenshotView::OnSelectionFinished() {
160 overlay_delegate_->Cancel(); 160 overlay_delegate_->Cancel();
161 if (!is_dragging_) 161 if (!is_dragging_)
162 return; 162 return;
163 163
164 is_dragging_ = false; 164 is_dragging_ = false;
165 if (screenshot_delegate_) { 165 if (screenshot_delegate_) {
166 aura::RootWindow *root_window = 166 aura::Window*root_window =
167 GetWidget()->GetNativeWindow()->GetRootWindow(); 167 GetWidget()->GetNativeWindow()->GetRootWindow();
168 screenshot_delegate_->HandleTakePartialScreenshot( 168 screenshot_delegate_->HandleTakePartialScreenshot(
169 root_window, 169 root_window,
170 gfx::IntersectRects(root_window->bounds(), GetScreenshotRect())); 170 gfx::IntersectRects(root_window->bounds(), GetScreenshotRect()));
171 } 171 }
172 } 172 }
173 173
174 gfx::NativeCursor PartialScreenshotView::GetCursor( 174 gfx::NativeCursor PartialScreenshotView::GetCursor(
175 const ui::MouseEvent& event) { 175 const ui::MouseEvent& event) {
176 // Always use "crosshair" cursor. 176 // Always use "crosshair" cursor.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 OnSelectionFinished(); 234 OnSelectionFinished();
235 break; 235 break;
236 default: 236 default:
237 break; 237 break;
238 } 238 }
239 239
240 event->SetHandled(); 240 event->SetHandled();
241 } 241 }
242 242
243 } // namespace ash 243 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/screen_dimmer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698