| OLD | NEW |
| 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/ui/views/dropdown_bar_host.h" | 5 #include "chrome/browser/ui/views/dropdown_bar_host.h" |
| 6 | 6 |
| 7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
| 8 #include "ui/views/view_constants_aura.h" | 8 #include "ui/views/view_constants_aura.h" |
| 9 #include "ui/views/widget/widget.h" | 9 #include "ui/views/widget/widget.h" |
| 10 | 10 |
| 11 void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos, | |
| 12 bool no_redraw) { | |
| 13 if (!host_->IsVisible()) | |
| 14 host_->GetNativeView()->Show(); | |
| 15 host_->GetNativeView()->SetBounds(new_pos); | |
| 16 | |
| 17 // The z-order of |host_| is controlled by the view specified via | |
| 18 // views::kHostViewKey. | |
| 19 } | |
| 20 | |
| 21 void DropdownBarHost::SetHostViewNative(views::View* host_view) { | 11 void DropdownBarHost::SetHostViewNative(views::View* host_view) { |
| 22 host_->GetNativeView()->SetProperty(views::kHostViewKey, host_view); | 12 host_->GetNativeView()->SetProperty(views::kHostViewKey, host_view); |
| 23 } | 13 } |
| OLD | NEW |