| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Overriddden from View: | 31 // Overriddden from View: |
| 32 virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE; | 32 virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 gfx::Rect GetScreenshotRect() const; | 35 gfx::Rect GetScreenshotRect() const; |
| 36 | 36 |
| 37 void set_window(aura::Window* window) { window_ = window; } | 37 void set_window(aura::Window* window) { window_ = window; } |
| 38 | 38 |
| 39 // Overridden from View: | 39 // Overridden from View: |
| 40 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 40 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE; |
| 41 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 41 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
| 42 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 42 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
| 43 virtual bool OnMouseWheel(const views::MouseWheelEvent& event) OVERRIDE; | 43 virtual bool OnMouseWheel(const views::MouseWheelEvent& event) OVERRIDE; |
| 44 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 44 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
| 45 | 45 |
| 46 bool is_dragging_; | 46 bool is_dragging_; |
| 47 gfx::Point start_position_; | 47 gfx::Point start_position_; |
| 48 gfx::Point current_position_; | 48 gfx::Point current_position_; |
| 49 ScreenshotDelegate* screenshot_delegate_; | 49 ScreenshotDelegate* screenshot_delegate_; |
| 50 aura::Window* window_; | 50 aura::Window* window_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView); | 52 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace ash | 55 } // namespace ash |
| 56 | 56 |
| 57 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ | 57 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ |
| OLD | NEW |