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 #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 "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
(...skipping 20 matching lines...) Expand all Loading... | |
31 PartialScreenshotView(OverlayDelegate* overlay_delegate, | 31 PartialScreenshotView(OverlayDelegate* overlay_delegate, |
32 ScreenshotDelegate* screenshot_delegate); | 32 ScreenshotDelegate* screenshot_delegate); |
33 virtual ~PartialScreenshotView(); | 33 virtual ~PartialScreenshotView(); |
34 | 34 |
35 // Initializes partial screenshot UI widget for |root_window|. | 35 // Initializes partial screenshot UI widget for |root_window|. |
36 void Init(aura::RootWindow* root_window); | 36 void Init(aura::RootWindow* root_window); |
37 | 37 |
38 // Returns the currently selected region. | 38 // Returns the currently selected region. |
39 gfx::Rect GetScreenshotRect() const; | 39 gfx::Rect GetScreenshotRect() const; |
40 | 40 |
41 void OnSelectionStarted(const gfx::Point& position); | |
42 void OnSelectionChanged(const gfx::Point& position); | |
43 void OnSelectionFinished(); | |
44 | |
41 // Overridden from views::View: | 45 // Overridden from views::View: |
42 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; | 46 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; |
43 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 47 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
44 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 48 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
45 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 49 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
46 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; | 50 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; |
47 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 51 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
48 | 52 |
53 // Overidden from ui::EventHandler | |
sadrul
2013/03/25 22:42:14
:
Yufeng Shen (Slow to review)
2013/03/25 22:55:01
Done.
| |
54 virtual void OnGestureEvent(ui::GestureEvent* event); | |
55 | |
49 bool is_dragging_; | 56 bool is_dragging_; |
50 gfx::Point start_position_; | 57 gfx::Point start_position_; |
51 gfx::Point current_position_; | 58 gfx::Point current_position_; |
52 | 59 |
53 // The delegate to receive Cancel. No ownership. | 60 // The delegate to receive Cancel. No ownership. |
54 OverlayDelegate* overlay_delegate_; | 61 OverlayDelegate* overlay_delegate_; |
55 | 62 |
56 // ScreenshotDelegate to take the actual screenshot. No ownership. | 63 // ScreenshotDelegate to take the actual screenshot. No ownership. |
57 ScreenshotDelegate* screenshot_delegate_; | 64 ScreenshotDelegate* screenshot_delegate_; |
58 | 65 |
59 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView); | 66 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView); |
60 }; | 67 }; |
61 | 68 |
62 } // namespace ash | 69 } // namespace ash |
63 | 70 |
64 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ | 71 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ |
OLD | NEW |