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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_popup_view_views.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Further renaming Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 params.parent = controller_->container_view(); 217 params.parent = controller_->container_view();
218 widget->Init(params); 218 widget->Init(params);
219 widget->SetContentsView(this); 219 widget->SetContentsView(this);
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 SetBorder(views::Border::CreateSolidBorder(kBorderThickness, kBorderColor));
228 228
229 UpdateBoundsAndRedrawPopup(); 229 UpdateBoundsAndRedrawPopup();
230 GetWidget()->ShowInactive(); 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));
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698