Chromium Code Reviews| 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; |
| 52 virtual void OnMouseCaptureLost() OVERRIDE; | |
| 53 | |
| 54 // Overidden from ui::EventHandler: | |
|
sky
2013/03/26 14:43:35
Isn't this overriden from View too?
Yufeng Shen (Slow to review)
2013/03/26 15:35:14
right, removed.
| |
| 55 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | |
| 48 | 56 |
| 49 bool is_dragging_; | 57 bool is_dragging_; |
| 50 gfx::Point start_position_; | 58 gfx::Point start_position_; |
| 51 gfx::Point current_position_; | 59 gfx::Point current_position_; |
| 52 | 60 |
| 53 // The delegate to receive Cancel. No ownership. | 61 // The delegate to receive Cancel. No ownership. |
| 54 OverlayDelegate* overlay_delegate_; | 62 OverlayDelegate* overlay_delegate_; |
| 55 | 63 |
| 56 // ScreenshotDelegate to take the actual screenshot. No ownership. | 64 // ScreenshotDelegate to take the actual screenshot. No ownership. |
| 57 ScreenshotDelegate* screenshot_delegate_; | 65 ScreenshotDelegate* screenshot_delegate_; |
| 58 | 66 |
| 59 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView); | 67 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView); |
| 60 }; | 68 }; |
| 61 | 69 |
| 62 } // namespace ash | 70 } // namespace ash |
| 63 | 71 |
| 64 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ | 72 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ |
| OLD | NEW |