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

Side by Side Diff: chrome/browser/ui/views/notifications/balloon_view.h

Issue 8301022: ui/views: Migrate usages of ScopedRunnableMethodFactory to base::WeakPtrFactory/base::Bind pair. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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) 2011 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 // 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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/task.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/notifications/balloon.h" 14 #include "chrome/browser/notifications/balloon.h"
15 #include "chrome/browser/ui/views/notifications/balloon_view_host.h" 15 #include "chrome/browser/ui/views/notifications/balloon_view_host.h"
16 #include "content/common/notification_registrar.h" 16 #include "content/common/notification_registrar.h"
17 #include "ui/base/animation/animation_delegate.h" 17 #include "ui/base/animation/animation_delegate.h"
18 #include "ui/gfx/path.h" 18 #include "ui/gfx/path.h"
19 #include "ui/gfx/point.h" 19 #include "ui/gfx/point.h"
20 #include "ui/gfx/rect.h" 20 #include "ui/gfx/rect.h"
21 #include "ui/gfx/size.h" 21 #include "ui/gfx/size.h"
22 #include "views/controls/button/menu_button.h" 22 #include "views/controls/button/menu_button.h"
23 #include "views/controls/label.h" 23 #include "views/controls/label.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 views::Widget* frame_container_; 134 views::Widget* frame_container_;
135 135
136 // The window that contains the contents of the notification. 136 // The window that contains the contents of the notification.
137 // Pointer owned by the View subclass. 137 // Pointer owned by the View subclass.
138 views::Widget* html_container_; 138 views::Widget* html_container_;
139 139
140 // The renderer of the HTML contents. 140 // The renderer of the HTML contents.
141 scoped_ptr<BalloonViewHost> html_contents_; 141 scoped_ptr<BalloonViewHost> html_contents_;
142 142
143 // The following factory is used to call methods at a later time. 143 // The following factory is used to call methods at a later time.
144 ScopedRunnableMethodFactory<BalloonViewImpl> method_factory_; 144 base::WeakPtrFactory<BalloonViewImpl> method_factory_;
145 145
146 // Pointer to sub-view is owned by the View sub-class. 146 // Pointer to sub-view is owned by the View sub-class.
147 views::ImageButton* close_button_; 147 views::ImageButton* close_button_;
148 148
149 // Pointer to sub-view is owned by View class. 149 // Pointer to sub-view is owned by View class.
150 views::Label* source_label_; 150 views::Label* source_label_;
151 151
152 // An animation to move the balloon on the screen as its position changes. 152 // An animation to move the balloon on the screen as its position changes.
153 scoped_ptr<ui::SlideAnimation> animation_; 153 scoped_ptr<ui::SlideAnimation> animation_;
154 gfx::Rect anim_frame_start_; 154 gfx::Rect anim_frame_start_;
155 gfx::Rect anim_frame_end_; 155 gfx::Rect anim_frame_end_;
156 156
157 // The options menu. 157 // The options menu.
158 scoped_ptr<NotificationOptionsMenuModel> options_menu_model_; 158 scoped_ptr<NotificationOptionsMenuModel> options_menu_model_;
159 scoped_ptr<views::MenuRunner> menu_runner_; 159 scoped_ptr<views::MenuRunner> menu_runner_;
160 views::MenuButton* options_menu_button_; 160 views::MenuButton* options_menu_button_;
161 161
162 NotificationRegistrar notification_registrar_; 162 NotificationRegistrar notification_registrar_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl); 164 DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl);
165 }; 165 };
166 166
167 #endif // CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ 167 #endif // CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.cc ('k') | chrome/browser/ui/views/notifications/balloon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698