OLD | NEW |
1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "ui/views/view.h" | 12 #include "ui/views/view.h" |
13 | 13 |
14 class PanelScroller; | 14 class PanelScroller; |
15 | 15 |
16 class PanelScrollerHeader : public views::View { | 16 class PanelScrollerHeader : public views::View { |
17 public: | 17 public: |
18 explicit PanelScrollerHeader(PanelScroller* scroller); | 18 explicit PanelScrollerHeader(PanelScroller* scroller); |
19 virtual ~PanelScrollerHeader(); | 19 virtual ~PanelScrollerHeader(); |
20 | 20 |
21 void set_title(const string16& title) { title_ = title; } | 21 void set_title(const string16& title) { title_ = title; } |
22 | 22 |
23 // views::View overrides. | 23 // views::View overrides. |
24 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 24 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
25 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 25 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
26 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 26 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
27 virtual void OnMouseCaptureLost() OVERRIDE; | 27 virtual void OnMouseCaptureLost() OVERRIDE; |
28 virtual gfx::Size GetPreferredSize() OVERRIDE; | 28 virtual gfx::Size GetPreferredSize() OVERRIDE; |
29 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 29 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE; |
30 | 30 |
31 private: | 31 private: |
32 // Non-owning pointer to our parent scroller object. | 32 // Non-owning pointer to our parent scroller object. |
33 PanelScroller* scroller_; | 33 PanelScroller* scroller_; |
34 | 34 |
35 string16 title_; | 35 string16 title_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(PanelScrollerHeader); | 37 DISALLOW_COPY_AND_ASSIGN(PanelScrollerHeader); |
38 }; | 38 }; |
39 | 39 |
40 #endif // CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_ | 40 #endif // CHROME_BROWSER_CHROMEOS_PANELS_PANEL_SCROLLER_HEADER_H_ |
OLD | NEW |