| 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/autofill/autofill_popup_view_views.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_popup_view_views.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" | 7 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
| 8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
| 9 #include "third_party/WebKit/public/web/WebAutofillClient.h" | 9 #include "third_party/WebKit/public/web/WebAutofillClient.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 #if defined(USE_AURA) | 220 #if defined(USE_AURA) |
| 221 // No animation for popup appearance (too distracting). | 221 // No animation for popup appearance (too distracting). |
| 222 views::corewm::SetWindowVisibilityAnimationTransition( | 222 views::corewm::SetWindowVisibilityAnimationTransition( |
| 223 widget->GetNativeView(), views::corewm::ANIMATE_HIDE); | 223 widget->GetNativeView(), views::corewm::ANIMATE_HIDE); |
| 224 #endif | 224 #endif |
| 225 } | 225 } |
| 226 | 226 |
| 227 set_border(views::Border::CreateSolidBorder(kBorderThickness, kBorderColor)); | 227 set_border(views::Border::CreateSolidBorder(kBorderThickness, kBorderColor)); |
| 228 | 228 |
| 229 UpdateBoundsAndRedrawPopup(); | 229 UpdateBoundsAndRedrawPopup(); |
| 230 GetWidget()->Show(); | 230 GetWidget()->ShowInactive(); |
| 231 | 231 |
| 232 if (controller_->hide_on_outside_click()) | 232 if (controller_->hide_on_outside_click()) |
| 233 GetWidget()->SetCapture(this); | 233 GetWidget()->SetCapture(this); |
| 234 } | 234 } |
| 235 | 235 |
| 236 void AutofillPopupViewViews::InvalidateRow(size_t row) { | 236 void AutofillPopupViewViews::InvalidateRow(size_t row) { |
| 237 SchedulePaintInRect(controller_->GetRowBounds(row)); | 237 SchedulePaintInRect(controller_->GetRowBounds(row)); |
| 238 } | 238 } |
| 239 | 239 |
| 240 void AutofillPopupViewViews::UpdateBoundsAndRedrawPopup() { | 240 void AutofillPopupViewViews::UpdateBoundsAndRedrawPopup() { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 // If the top level widget can't be found, cancel the popup since we can't | 315 // If the top level widget can't be found, cancel the popup since we can't |
| 316 // fully set it up. | 316 // fully set it up. |
| 317 if (!observing_widget) | 317 if (!observing_widget) |
| 318 return NULL; | 318 return NULL; |
| 319 | 319 |
| 320 return new AutofillPopupViewViews(controller, observing_widget); | 320 return new AutofillPopupViewViews(controller, observing_widget); |
| 321 } | 321 } |
| 322 | 322 |
| 323 } // namespace autofill | 323 } // namespace autofill |
| OLD | NEW |