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

Side by Side Diff: chrome/browser/chromeos/panels/panel_scroller.h

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "ui/base/animation/animation_delegate.h" 12 #include "ui/base/animation/animation_delegate.h"
13 #include "ui/base/animation/slide_animation.h" 13 #include "ui/base/animation/slide_animation.h"
14 #include "views/view.h" 14 #include "views/view.h"
15 15
16 class PanelScrollerHeader; 16 class PanelScrollerHeader;
17 17
18 class PanelScroller : public views::View, public ui::AnimationDelegate { 18 class PanelScroller : public views::View, public ui::AnimationDelegate {
19 public: 19 public:
20 PanelScroller(); 20 PanelScroller();
21 ~PanelScroller(); 21 ~PanelScroller();
22 22
23 static PanelScroller* CreateWindow(); 23 static PanelScroller* CreateWindow();
24 24
25 // View overrides. 25 // Overridden from View:
26 virtual void ViewHierarchyChanged(bool is_add, 26 virtual void ViewHierarchyChanged(bool is_add,
27 views::View* parent, 27 views::View* parent,
28 views::View* child); 28 views::View* child) OVERRIDE;
29 virtual gfx::Size GetPreferredSize(); 29 virtual gfx::Size GetPreferredSize() OVERRIDE;
30 virtual void Layout(); 30 virtual void Layout() OVERRIDE;
31 virtual bool OnMousePressed(const views::MouseEvent& event); 31 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
32 virtual bool OnMouseDragged(const views::MouseEvent& event); 32 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
33 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled);
34 33
35 // Called when a panel header is clicked with the affected container. This 34 // Called when a panel header is clicked with the affected container. This
36 // function will make sure the panel is fully visible. 35 // function will make sure the panel is fully visible.
37 void HeaderClicked(PanelScrollerHeader* source); 36 void HeaderClicked(PanelScrollerHeader* source);
38 37
39 private: 38 private:
40 struct Panel; 39 struct Panel;
41 40
42 // ui::AnimationDelegate overrides. 41 // ui::AnimationDelegate overrides.
43 virtual void AnimationProgressed(const ui::Animation* animation); 42 virtual void AnimationProgressed(const ui::Animation* animation);
(...skipping 17 matching lines...) Expand all
61 // When animating a scroll, these indicate the beginning and ending of the 60 // When animating a scroll, these indicate the beginning and ending of the
62 // scroll. The scroll_pos_ always indicates the current one. 61 // scroll. The scroll_pos_ always indicates the current one.
63 int animated_scroll_begin_; 62 int animated_scroll_begin_;
64 int animated_scroll_end_; 63 int animated_scroll_end_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(PanelScroller); 65 DISALLOW_COPY_AND_ASSIGN(PanelScroller);
67 }; 66 };
68 67
69 #endif // CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_H_ 68 #endif // CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_H_
70 69
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/candidate_window.cc ('k') | chrome/browser/chromeos/panels/panel_scroller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698