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

Unified Diff: chrome/browser/ui/views/tabs/dragged_tab_controller.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.cc ('k') | chrome/browser/ui/views/tabs/dragged_tab_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/dragged_tab_controller.cc
===================================================================
--- chrome/browser/ui/views/tabs/dragged_tab_controller.cc (revision 85284)
+++ chrome/browser/ui/views/tabs/dragged_tab_controller.cc (working copy)
@@ -203,8 +203,7 @@
hidden_(false),
in_enable_area_(info.in_enable_area()) {
#if defined(OS_WIN)
- popup_ = views::Widget::CreateWidget();
- popup_->SetOpacity(0x00);
+ popup_ = new views::Widget;
// TODO(sky): This should "just work" on Gtk now.
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
params.transparent = true;
@@ -212,6 +211,7 @@
params.bounds = info.GetPopupRect();
popup_->Init(params);
popup_->SetContentsView(new DockView(info.type()));
+ popup_->SetOpacity(0x00);
if (info.in_enable_area())
animation_.Reset(1);
else
@@ -265,23 +265,15 @@
virtual void AnimationEnded(const ui::Animation* animation) {
if (!hidden_)
return;
-#if defined(OS_WIN)
- static_cast<views::WidgetWin*>(popup_)->Close();
-#else
- NOTIMPLEMENTED();
-#endif
+ popup_->Close();
delete this;
}
virtual void UpdateLayeredAlpha() {
-#if defined(OS_WIN)
double scale = in_enable_area_ ? 1 : .5;
- static_cast<views::WidgetWin*>(popup_)->SetOpacity(
- static_cast<BYTE>(animation_.GetCurrentValue() * scale * 255.0));
+ popup_->SetOpacity(static_cast<unsigned char>(animation_.GetCurrentValue() *
+ scale * 255.0));
popup_->GetRootView()->SchedulePaint();
-#else
- NOTIMPLEMENTED();
-#endif
}
private:
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.cc ('k') | chrome/browser/ui/views/tabs/dragged_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698