| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 params.delegate = this; | 54 params.delegate = this; |
| 55 params.parent = parent_widget_->GetNativeView(); | 55 params.parent = parent_widget_->GetNativeView(); |
| 56 widget->Init(params); | 56 widget->Init(params); |
| 57 | 57 |
| 58 // No animation for popup appearance (too distracting). | 58 // No animation for popup appearance (too distracting). |
| 59 widget->SetVisibilityAnimationTransition(views::Widget::ANIMATE_HIDE); | 59 widget->SetVisibilityAnimationTransition(views::Widget::ANIMATE_HIDE); |
| 60 | 60 |
| 61 show_time_ = base::Time::Now(); | 61 show_time_ = base::Time::Now(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 // TODO(crbug.com/676164): Show different border color when focused/unfocused | |
| 65 SetBorder(views::CreateSolidBorder( | 64 SetBorder(views::CreateSolidBorder( |
| 66 kPopupBorderThickness, | 65 kPopupBorderThickness, |
| 67 GetNativeTheme()->GetSystemColor( | 66 GetNativeTheme()->GetSystemColor( |
| 68 ui::NativeTheme::kColorId_UnfocusedBorderColor))); | 67 ui::NativeTheme::kColorId_UnfocusedBorderColor))); |
| 69 | 68 |
| 70 DoUpdateBoundsAndRedrawPopup(); | 69 DoUpdateBoundsAndRedrawPopup(); |
| 71 GetWidget()->Show(); | 70 GetWidget()->Show(); |
| 72 | 71 |
| 73 // Showing the widget can change native focus (which would result in an | 72 // Showing the widget can change native focus (which would result in an |
| 74 // immediate hiding of the popup). Only start observing after shown. | 73 // immediate hiding of the popup). Only start observing after shown. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 void AutofillPopupBaseView::HideController() { | 234 void AutofillPopupBaseView::HideController() { |
| 236 if (delegate_) | 235 if (delegate_) |
| 237 delegate_->Hide(); | 236 delegate_->Hide(); |
| 238 } | 237 } |
| 239 | 238 |
| 240 gfx::NativeView AutofillPopupBaseView::container_view() { | 239 gfx::NativeView AutofillPopupBaseView::container_view() { |
| 241 return delegate_->container_view(); | 240 return delegate_->container_view(); |
| 242 } | 241 } |
| 243 | 242 |
| 244 } // namespace autofill | 243 } // namespace autofill |
| OLD | NEW |