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

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

Issue 13006010: Add support for taking partial screenshot using touch (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/wm/partial_screenshot_view.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 #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ 5 #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_
6 #define ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ 6 #define ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_
7 7
8 #include <vector>
9
8 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
9 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h"
10 #include "ui/gfx/point.h" 13 #include "ui/gfx/point.h"
11 #include "ui/views/widget/widget_delegate.h" 14 #include "ui/views/widget/widget_delegate.h"
12 15
13 namespace aura { 16 namespace aura {
14 class RootWindow; 17 class RootWindow;
15 } 18 }
16 19
17 namespace ash { 20 namespace ash {
18 class ScreenshotDelegate; 21 class ScreenshotDelegate;
19 22
20 // The view of taking partial screenshot, i.e.: drawing region 23 // The view of taking partial screenshot, i.e.: drawing region
21 // rectangles during drag, and changing the mouse cursor to indicate 24 // rectangles during drag, and changing the mouse cursor to indicate
22 // the current mode. 25 // the current mode.
23 class ASH_EXPORT PartialScreenshotView : public views::WidgetDelegateView { 26 class ASH_EXPORT PartialScreenshotView : public views::WidgetDelegateView {
24 public: 27 public:
25 // Starts the UI for taking partial screenshot; dragging to select a region. 28 // Starts the UI for taking partial screenshot; dragging to select a region.
26 static void StartPartialScreenshot(ScreenshotDelegate* screenshot_delegate); 29 static std::vector<PartialScreenshotView*>
30 StartPartialScreenshot(ScreenshotDelegate* screenshot_delegate);
27 31
28 private: 32 private:
33 FRIEND_TEST_ALL_PREFIXES(PartialScreenshotViewTest, BasicMouse);
34 FRIEND_TEST_ALL_PREFIXES(PartialScreenshotViewTest, BasicTouch);
35
29 class OverlayDelegate; 36 class OverlayDelegate;
30 37
31 PartialScreenshotView(OverlayDelegate* overlay_delegate, 38 PartialScreenshotView(OverlayDelegate* overlay_delegate,
32 ScreenshotDelegate* screenshot_delegate); 39 ScreenshotDelegate* screenshot_delegate);
33 virtual ~PartialScreenshotView(); 40 virtual ~PartialScreenshotView();
34 41
35 // Initializes partial screenshot UI widget for |root_window|. 42 // Initializes partial screenshot UI widget for |root_window|.
36 void Init(aura::RootWindow* root_window); 43 void Init(aura::RootWindow* root_window);
37 44
38 // Returns the currently selected region. 45 // Returns the currently selected region.
(...skipping 22 matching lines...) Expand all
61 68
62 // ScreenshotDelegate to take the actual screenshot. No ownership. 69 // ScreenshotDelegate to take the actual screenshot. No ownership.
63 ScreenshotDelegate* screenshot_delegate_; 70 ScreenshotDelegate* screenshot_delegate_;
64 71
65 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView); 72 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView);
66 }; 73 };
67 74
68 } // namespace ash 75 } // namespace ash
69 76
70 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ 77 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698