| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/autofill/autofill_popup_base_view.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/autofill/popup_constants.h" | 7 #include "chrome/browser/ui/autofill/popup_constants.h" |
| 8 #include "ui/gfx/point.h" | 8 #include "ui/gfx/point.h" |
| 9 #include "ui/gfx/screen.h" | 9 #include "ui/gfx/screen.h" |
| 10 #include "ui/views/border.h" | 10 #include "ui/views/border.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // a weak pointer to hold the reference and don't have to worry about | 51 // a weak pointer to hold the reference and don't have to worry about |
| 52 // deletion. | 52 // deletion. |
| 53 views::Widget* widget = new views::Widget; | 53 views::Widget* widget = new views::Widget; |
| 54 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); | 54 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
| 55 params.delegate = this; | 55 params.delegate = this; |
| 56 params.parent = container_view(); | 56 params.parent = container_view(); |
| 57 widget->Init(params); | 57 widget->Init(params); |
| 58 widget->SetContentsView(this); | 58 widget->SetContentsView(this); |
| 59 #if defined(USE_AURA) | 59 #if defined(USE_AURA) |
| 60 // No animation for popup appearance (too distracting). | 60 // No animation for popup appearance (too distracting). |
| 61 views::corewm::SetWindowVisibilityAnimationTransition( | 61 wm::SetWindowVisibilityAnimationTransition( |
| 62 widget->GetNativeView(), views::corewm::ANIMATE_HIDE); | 62 widget->GetNativeView(), wm::ANIMATE_HIDE); |
| 63 #endif | 63 #endif |
| 64 } | 64 } |
| 65 | 65 |
| 66 SetBorder(views::Border::CreateSolidBorder(kPopupBorderThickness, | 66 SetBorder(views::Border::CreateSolidBorder(kPopupBorderThickness, |
| 67 kBorderColor)); | 67 kBorderColor)); |
| 68 | 68 |
| 69 DoUpdateBoundsAndRedrawPopup(); | 69 DoUpdateBoundsAndRedrawPopup(); |
| 70 GetWidget()->Show(); | 70 GetWidget()->Show(); |
| 71 | 71 |
| 72 if (ShouldHideOnOutsideClick()) | 72 if (ShouldHideOnOutsideClick()) |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 bool AutofillPopupBaseView::ShouldRepostEvent(const ui::MouseEvent& event) { | 232 bool AutofillPopupBaseView::ShouldRepostEvent(const ui::MouseEvent& event) { |
| 233 return delegate_->ShouldRepostEvent(event); | 233 return delegate_->ShouldRepostEvent(event); |
| 234 } | 234 } |
| 235 | 235 |
| 236 gfx::NativeView AutofillPopupBaseView::container_view() { | 236 gfx::NativeView AutofillPopupBaseView::container_view() { |
| 237 return delegate_->container_view(); | 237 return delegate_->container_view(); |
| 238 } | 238 } |
| 239 | 239 |
| 240 | 240 |
| 241 } // namespace autofill | 241 } // namespace autofill |
| OLD | NEW |