OLD | NEW |
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 virtual ~OverlayDelegate() { | 72 virtual ~OverlayDelegate() { |
73 Shell::GetInstance()->overlay_filter()->Deactivate(); | 73 Shell::GetInstance()->overlay_filter()->Deactivate(); |
74 } | 74 } |
75 | 75 |
76 std::vector<views::Widget*> widgets_; | 76 std::vector<views::Widget*> widgets_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(OverlayDelegate); | 78 DISALLOW_COPY_AND_ASSIGN(OverlayDelegate); |
79 }; | 79 }; |
80 | 80 |
81 // static | 81 // static |
82 void PartialScreenshotView::StartPartialScreenshot( | 82 std::vector<PartialScreenshotView*> |
| 83 PartialScreenshotView::StartPartialScreenshot( |
83 ScreenshotDelegate* screenshot_delegate) { | 84 ScreenshotDelegate* screenshot_delegate) { |
| 85 std::vector<PartialScreenshotView*> views; |
84 OverlayDelegate* overlay_delegate = new OverlayDelegate(); | 86 OverlayDelegate* overlay_delegate = new OverlayDelegate(); |
85 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 87 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
86 for (Shell::RootWindowList::iterator it = root_windows.begin(); | 88 for (Shell::RootWindowList::iterator it = root_windows.begin(); |
87 it != root_windows.end(); ++it) { | 89 it != root_windows.end(); ++it) { |
88 PartialScreenshotView* new_view = new PartialScreenshotView( | 90 PartialScreenshotView* new_view = new PartialScreenshotView( |
89 overlay_delegate, screenshot_delegate); | 91 overlay_delegate, screenshot_delegate); |
90 new_view->Init(*it); | 92 new_view->Init(*it); |
| 93 views.push_back(new_view); |
91 } | 94 } |
| 95 return views; |
92 } | 96 } |
93 | 97 |
94 PartialScreenshotView::PartialScreenshotView( | 98 PartialScreenshotView::PartialScreenshotView( |
95 PartialScreenshotView::OverlayDelegate* overlay_delegate, | 99 PartialScreenshotView::OverlayDelegate* overlay_delegate, |
96 ScreenshotDelegate* screenshot_delegate) | 100 ScreenshotDelegate* screenshot_delegate) |
97 : is_dragging_(false), | 101 : is_dragging_(false), |
98 overlay_delegate_(overlay_delegate), | 102 overlay_delegate_(overlay_delegate), |
99 screenshot_delegate_(screenshot_delegate) { | 103 screenshot_delegate_(screenshot_delegate) { |
100 } | 104 } |
101 | 105 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 OnSelectionFinished(); | 234 OnSelectionFinished(); |
231 break; | 235 break; |
232 default: | 236 default: |
233 break; | 237 break; |
234 } | 238 } |
235 | 239 |
236 event->SetHandled(); | 240 event->SetHandled(); |
237 } | 241 } |
238 | 242 |
239 } // namespace ash | 243 } // namespace ash |
OLD | NEW |