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

Side by Side Diff: chrome/browser/ui/views/location_bar/origin_chip_view.cc

Issue 657333002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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/location_bar/origin_chip_view.h" 5 #include "chrome/browser/ui/views/location_bar/origin_chip_view.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 SkAutoLockPixels pixel_lock(bitmap); 340 SkAutoLockPixels pixel_lock(bitmap);
341 background_colors_[i] = 341 background_colors_[i] =
342 bitmap.getColor(bitmap.width() / 2, bitmap.height() / 2); 342 bitmap.getColor(bitmap.width() / 2, bitmap.height() / 2);
343 } 343 }
344 344
345 // Calculate the actual text color of the pressed label. 345 // Calculate the actual text color of the pressed label.
346 host_label_->SetBackgroundColor(background_colors_[Button::STATE_PRESSED]); 346 host_label_->SetBackgroundColor(background_colors_[Button::STATE_PRESSED]);
347 pressed_text_color_ = host_label_->enabled_color(); 347 pressed_text_color_ = host_label_->enabled_color();
348 host_label_->SetBackgroundColor(background_colors_[state()]); 348 host_label_->SetBackgroundColor(background_colors_[state()]);
349 349
350 SetBorder(border.PassAs<views::Border>()); 350 SetBorder(border.Pass());
351 } 351 }
352 352
353 void OriginChipView::AnimationProgressed(const gfx::Animation* animation) { 353 void OriginChipView::AnimationProgressed(const gfx::Animation* animation) {
354 if (animation == &fade_in_animation_) 354 if (animation == &fade_in_animation_)
355 SchedulePaint(); 355 SchedulePaint();
356 else 356 else
357 views::LabelButton::AnimationProgressed(animation); 357 views::LabelButton::AnimationProgressed(animation);
358 } 358 }
359 359
360 void OriginChipView::AnimationEnded(const gfx::Animation* animation) { 360 void OriginChipView::AnimationEnded(const gfx::Animation* animation) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 // Note: When OnSafeBrowsingHit would be called, OnSafeBrowsingMatch will 409 // Note: When OnSafeBrowsingHit would be called, OnSafeBrowsingMatch will
410 // have already been called. 410 // have already been called.
411 void OriginChipView::OnSafeBrowsingHit( 411 void OriginChipView::OnSafeBrowsingHit(
412 const SafeBrowsingUIManager::UnsafeResource& resource) {} 412 const SafeBrowsingUIManager::UnsafeResource& resource) {}
413 413
414 void OriginChipView::OnSafeBrowsingMatch( 414 void OriginChipView::OnSafeBrowsingMatch(
415 const SafeBrowsingUIManager::UnsafeResource& resource) { 415 const SafeBrowsingUIManager::UnsafeResource& resource) {
416 OnChanged(); 416 OnChanged();
417 } 417 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | chrome/browser/ui/views/location_bar/search_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698