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

Side by Side Diff: chrome/browser/ui/views/download/download_started_animation_win.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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) 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 #include "chrome/browser/download/download_started_animation.h" 5 #include "chrome/browser/download/download_started_animation.h"
6 6
7 #include "content/browser/tab_contents/tab_contents.h" 7 #include "content/browser/tab_contents/tab_contents.h"
8 #include "content/common/notification_details.h" 8 #include "content/common/notification_details.h"
9 #include "content/common/notification_registrar.h" 9 #include "content/common/notification_registrar.h"
10 #include "content/common/notification_source.h" 10 #include "content/common/notification_source.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 this, 94 this,
95 NotificationType::TAB_CONTENTS_HIDDEN, 95 NotificationType::TAB_CONTENTS_HIDDEN,
96 Source<TabContents>(tab_contents_)); 96 Source<TabContents>(tab_contents_));
97 registrar_.Add( 97 registrar_.Add(
98 this, 98 this,
99 NotificationType::TAB_CONTENTS_DESTROYED, 99 NotificationType::TAB_CONTENTS_DESTROYED,
100 Source<TabContents>(tab_contents_)); 100 Source<TabContents>(tab_contents_));
101 101
102 SetImage(kDownloadImage); 102 SetImage(kDownloadImage);
103 103
104 popup_ = views::Widget::CreateWidget(); 104 popup_ = new views::Widget;
105 popup_->SetOpacity(0x00);
106 105
107 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 106 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
108 params.transparent = true; 107 params.transparent = true;
109 params.accept_events = false; 108 params.accept_events = false;
110 params.parent = tab_contents_->GetNativeView(); 109 params.parent = tab_contents_->GetNativeView();
111 popup_->Init(params); 110 popup_->Init(params);
111 popup_->SetOpacity(0x00);
112 popup_->SetContentsView(this); 112 popup_->SetContentsView(this);
113 Reposition(); 113 Reposition();
114 popup_->Show(); 114 popup_->Show();
115 115
116 Start(); 116 Start();
117 } 117 }
118 118
119 void DownloadStartedAnimationWin::Reposition() { 119 void DownloadStartedAnimationWin::Reposition() {
120 if (!tab_contents_) 120 if (!tab_contents_)
121 return; 121 return;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 174
175 } // namespace 175 } // namespace
176 176
177 // static 177 // static
178 void DownloadStartedAnimation::Show(TabContents* tab_contents) { 178 void DownloadStartedAnimation::Show(TabContents* tab_contents) {
179 // The animation will delete itself when it's finished or when the tab 179 // The animation will delete itself when it's finished or when the tab
180 // contents is hidden or destroyed. 180 // contents is hidden or destroyed.
181 new DownloadStartedAnimationWin(tab_contents); 181 new DownloadStartedAnimationWin(tab_contents);
182 } 182 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/dom_view_browsertest.cc ('k') | chrome/browser/ui/views/dropdown_bar_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698