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

Side by Side Diff: ash/display/shared_display_edge_indicator.h

Issue 10917090: Update drag edge indicator view per request by UX team (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_ 5 #ifndef ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_
6 #define ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_ 6 #define ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "ui/base/animation/animation_delegate.h" 11 #include "ui/base/animation/animation_delegate.h"
12 #include "ui/gfx/display.h" 12 #include "ui/gfx/display.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 class Rect; 15 class Rect;
16 } 16 }
17 17
18 namespace ui { 18 namespace ui {
19 class ThrobAnimation; 19 class ThrobAnimation;
20 } 20 }
21 21
22 namespace views { 22 namespace views {
23 class View;
23 class Widget; 24 class Widget;
24 } 25 }
25 26
26 namespace ash { 27 namespace ash {
27 namespace internal { 28 namespace internal {
28 29
29 // SharedDisplayEdgeIndicator is responsible for showing a window that indicates 30 // SharedDisplayEdgeIndicator is responsible for showing a window that indicates
30 // the edge that a window can be dragged into another display. 31 // the edge that a window can be dragged into another display.
31 class ASH_EXPORT SharedDisplayEdgeIndicator : public ui::AnimationDelegate { 32 class ASH_EXPORT SharedDisplayEdgeIndicator : public ui::AnimationDelegate {
32 public: 33 public:
33 SharedDisplayEdgeIndicator(); 34 SharedDisplayEdgeIndicator();
34 virtual ~SharedDisplayEdgeIndicator(); 35 virtual ~SharedDisplayEdgeIndicator();
35 36
36 // Shows/Hides the indicator window. The |src_bounds| is for the window on 37 // Shows/Hides the indicator window. The |src_bounds| is for the window on
37 // the source display, and the |dst_bounds| is for the window on the other 38 // the source display, and the |dst_bounds| is for the window on the other
38 // display. 39 // display.
39 void Show(const gfx::Rect& src_bounds, const gfx::Rect& dst_bounds); 40 void Show(const gfx::Rect& src_bounds, const gfx::Rect& dst_bounds);
40 void Hide(); 41 void Hide();
41 42
42 // ui::AnimationDelegate overrides: 43 // ui::AnimationDelegate overrides:
43 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 44 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
44 45
45 private: 46 private:
46 // Used to show the displays' shared edge where a window can be moved across. 47 // Used to show the displays' shared edge where a window can be moved across.
47 // |src_widget_| is for the display where drag starts and |dst_widget_| is 48 // |src_widget_| is for the display where drag starts and |dst_widget_| is
48 // for the other display. 49 // for the other display.
49 views::Widget* src_widget_; 50 views::View* src_indicator_;
50 views::Widget* dst_widget_; 51 views::View* dst_indicator_;
51 52
52 // Used to transition the opacity. 53 // Used to transition the opacity.
53 scoped_ptr<ui::ThrobAnimation> animation_; 54 scoped_ptr<ui::ThrobAnimation> animation_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(SharedDisplayEdgeIndicator); 56 DISALLOW_COPY_AND_ASSIGN(SharedDisplayEdgeIndicator);
56 }; 57 };
57 58
58 } // namespace internal 59 } // namespace internal
59 } // namespace ash 60 } // namespace ash
60 61
61 #endif // ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_ 62 #endif // ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_
OLDNEW
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ash/display/shared_display_edge_indicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698