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

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

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/maximize_bubble_controller.cc ('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 "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/wm/overlay_event_filter.h" 9 #include "ash/wm/overlay_event_filter.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 10 matching lines...) Expand all
21 : public views::WidgetDelegateView, 21 : public views::WidgetDelegateView,
22 public internal::OverlayEventFilter::Delegate { 22 public internal::OverlayEventFilter::Delegate {
23 public: 23 public:
24 PartialScreenshotView(ScreenshotDelegate* screenshot_delegate); 24 PartialScreenshotView(ScreenshotDelegate* screenshot_delegate);
25 virtual ~PartialScreenshotView(); 25 virtual ~PartialScreenshotView();
26 26
27 // Starts the UI for taking partial screenshot; dragging to select a region. 27 // Starts the UI for taking partial screenshot; dragging to select a region.
28 static void StartPartialScreenshot(ScreenshotDelegate* screenshot_delegate); 28 static void StartPartialScreenshot(ScreenshotDelegate* screenshot_delegate);
29 29
30 // Overriddden from View: 30 // Overriddden from View:
31 virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE; 31 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE;
32 32
33 // Overridden from internal::OverlayEventFilter::Delegate: 33 // Overridden from internal::OverlayEventFilter::Delegate:
34 virtual void Cancel() OVERRIDE; 34 virtual void Cancel() OVERRIDE;
35 virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE; 35 virtual bool IsCancelingKeyEvent(ui::KeyEvent* event) OVERRIDE;
36 virtual aura::Window* GetWindow() OVERRIDE; 36 virtual aura::Window* GetWindow() OVERRIDE;
37 37
38 private: 38 private:
39 gfx::Rect GetScreenshotRect() const; 39 gfx::Rect GetScreenshotRect() const;
40 40
41 // Overridden from View: 41 // Overridden from View:
42 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 42 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
43 virtual void OnMouseCaptureLost() OVERRIDE; 43 virtual void OnMouseCaptureLost() OVERRIDE;
44 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 44 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
45 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; 45 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
46 virtual bool OnMouseWheel(const views::MouseWheelEvent& event) OVERRIDE; 46 virtual bool OnMouseWheel(const views::MouseWheelEvent& event) OVERRIDE;
47 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; 47 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
48 48
49 bool is_dragging_; 49 bool is_dragging_;
50 gfx::Point start_position_; 50 gfx::Point start_position_;
51 gfx::Point current_position_; 51 gfx::Point current_position_;
52 ScreenshotDelegate* screenshot_delegate_; 52 ScreenshotDelegate* screenshot_delegate_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView); 54 DISALLOW_COPY_AND_ASSIGN(PartialScreenshotView);
55 }; 55 };
56 56
57 } // namespace ash 57 } // namespace ash
58 58
59 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_ 59 #endif // #ifndef ASH_WM_PARTIAL_SCREENSHOT_VIEW_H_
OLDNEW
« no previous file with comments | « ash/wm/maximize_bubble_controller.cc ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698