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

Side by Side Diff: chrome/browser/ui/gtk/download/download_started_animation_gtk.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 #include "chrome/browser/download/download_started_animation.h" 5 #include "chrome/browser/download/download_started_animation.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 this, 166 this,
167 content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED, 167 content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
168 content::Source<WebContents>(web_contents_)); 168 content::Source<WebContents>(web_contents_));
169 registrar_.Remove( 169 registrar_.Remove(
170 this, 170 this,
171 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 171 content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
172 content::Source<WebContents>(web_contents_)); 172 content::Source<WebContents>(web_contents_));
173 173
174 web_contents_ = NULL; 174 web_contents_ = NULL;
175 gtk_widget_destroy(popup_); 175 gtk_widget_destroy(popup_);
176 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 176 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
177 } 177 }
178 178
179 void DownloadStartedAnimationGtk::AnimateToState(double state) { 179 void DownloadStartedAnimationGtk::AnimateToState(double state) {
180 if (!web_contents_) 180 if (!web_contents_)
181 return; 181 return;
182 182
183 if (state >= 1.0) { 183 if (state >= 1.0) {
184 Close(); 184 Close();
185 } else { 185 } else {
186 Reposition(); 186 Reposition();
(...skipping 19 matching lines...) Expand all
206 Close(); 206 Close();
207 } 207 }
208 208
209 } // namespace 209 } // namespace
210 210
211 // static 211 // static
212 void DownloadStartedAnimation::Show(WebContents* web_contents) { 212 void DownloadStartedAnimation::Show(WebContents* web_contents) {
213 // The animation will delete itself. 213 // The animation will delete itself.
214 new DownloadStartedAnimationGtk(web_contents); 214 new DownloadStartedAnimationGtk(web_contents);
215 } 215 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/download/download_shelf_gtk.cc ('k') | chrome/browser/ui/gtk/edit_search_engine_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698