| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/animation.h" | 7 #include "app/animation.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
| 10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 Source<TabContents>(tab_contents_)); | 99 Source<TabContents>(tab_contents_)); |
| 100 | 100 |
| 101 SetImage(kDownloadImage); | 101 SetImage(kDownloadImage); |
| 102 | 102 |
| 103 gfx::Rect rc(0, 0, 0, 0); | 103 gfx::Rect rc(0, 0, 0, 0); |
| 104 popup_ = new views::WidgetWin; | 104 popup_ = new views::WidgetWin; |
| 105 popup_->set_window_style(WS_POPUP); | 105 popup_->set_window_style(WS_POPUP); |
| 106 popup_->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW | | 106 popup_->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW | |
| 107 WS_EX_TRANSPARENT); | 107 WS_EX_TRANSPARENT); |
| 108 popup_->SetOpacity(0x00); | 108 popup_->SetOpacity(0x00); |
| 109 popup_->Init(tab_contents_->GetNativeView(), rc); | 109 popup_->Init(tab_contents_->GetNativeView(), rc, false); |
| 110 popup_->SetContentsView(this); | 110 popup_->SetContentsView(this); |
| 111 Reposition(); | 111 Reposition(); |
| 112 popup_->Show(); | 112 popup_->Show(); |
| 113 | 113 |
| 114 Start(); | 114 Start(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void DownloadStartedAnimationWin::Reposition() { | 117 void DownloadStartedAnimationWin::Reposition() { |
| 118 if (!tab_contents_) | 118 if (!tab_contents_) |
| 119 return; | 119 return; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace | 173 } // namespace |
| 174 | 174 |
| 175 // static | 175 // static |
| 176 void DownloadStartedAnimation::Show(TabContents* tab_contents) { | 176 void DownloadStartedAnimation::Show(TabContents* tab_contents) { |
| 177 // The animation will delete itself when it's finished or when the tab | 177 // The animation will delete itself when it's finished or when the tab |
| 178 // contents is hidden or destroyed. | 178 // contents is hidden or destroyed. |
| 179 new DownloadStartedAnimationWin(tab_contents); | 179 new DownloadStartedAnimationWin(tab_contents); |
| 180 } | 180 } |
| OLD | NEW |