OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Draws the view for the balloons. | 5 // Draws the view for the balloons. |
6 | 6 |
7 #ifndef CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ | 7 #ifndef CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ |
8 #define CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ | 8 #define CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 public: | 53 public: |
54 explicit BalloonViewImpl(BalloonCollection* collection); | 54 explicit BalloonViewImpl(BalloonCollection* collection); |
55 ~BalloonViewImpl(); | 55 ~BalloonViewImpl(); |
56 | 56 |
57 // BalloonView interface. | 57 // BalloonView interface. |
58 virtual void Show(Balloon* balloon); | 58 virtual void Show(Balloon* balloon); |
59 virtual void Update(); | 59 virtual void Update(); |
60 virtual void RepositionToBalloon(); | 60 virtual void RepositionToBalloon(); |
61 virtual void Close(bool by_user); | 61 virtual void Close(bool by_user); |
62 virtual gfx::Size GetSize() const; | 62 virtual gfx::Size GetSize() const; |
63 virtual BalloonHost* GetHost() const { return html_contents_.get(); } | 63 virtual BalloonHost* GetHost() const; |
64 | 64 |
65 private: | 65 private: |
66 // views::View interface. | 66 // views::View interface. |
67 virtual void Paint(gfx::Canvas* canvas); | 67 virtual void Paint(gfx::Canvas* canvas); |
68 virtual void DidChangeBounds(const gfx::Rect& previous, | 68 virtual void DidChangeBounds(const gfx::Rect& previous, |
69 const gfx::Rect& current); | 69 const gfx::Rect& current); |
70 virtual gfx::Size GetPreferredSize() { | 70 virtual gfx::Size GetPreferredSize(); |
71 return gfx::Size(1000, 1000); | |
72 } | |
73 | 71 |
74 // views::ViewMenuDelegate interface. | 72 // views::ViewMenuDelegate interface. |
75 virtual void RunMenu(views::View* source, const gfx::Point& pt); | 73 virtual void RunMenu(views::View* source, const gfx::Point& pt); |
76 | 74 |
77 // views::WidgetDelegate interface. | 75 // views::WidgetDelegate interface. |
78 virtual void DisplayChanged(); | 76 virtual void DisplayChanged(); |
79 virtual void WorkAreaChanged(); | 77 virtual void WorkAreaChanged(); |
80 | 78 |
81 // views::ButtonListener interface. | 79 // views::ButtonListener interface. |
82 virtual void ButtonPressed(views::Button* sender, const views::Event&); | 80 virtual void ButtonPressed(views::Button* sender, const views::Event&); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 scoped_ptr<NotificationOptionsMenuModel> options_menu_model_; | 161 scoped_ptr<NotificationOptionsMenuModel> options_menu_model_; |
164 scoped_ptr<views::Menu2> options_menu_menu_; | 162 scoped_ptr<views::Menu2> options_menu_menu_; |
165 views::MenuButton* options_menu_button_; | 163 views::MenuButton* options_menu_button_; |
166 | 164 |
167 NotificationRegistrar notification_registrar_; | 165 NotificationRegistrar notification_registrar_; |
168 | 166 |
169 DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl); | 167 DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl); |
170 }; | 168 }; |
171 | 169 |
172 #endif // CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ | 170 #endif // CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ |
OLD | NEW |