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/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 WebContents* contents = GetWebContentsFromDelegate(delegate_); | 488 WebContents* contents = GetWebContentsFromDelegate(delegate_); |
489 | 489 |
490 RefreshPageActionViews(); | 490 RefreshPageActionViews(); |
491 PageActionWithBadgeView* page_action_view = | 491 PageActionWithBadgeView* page_action_view = |
492 static_cast<PageActionWithBadgeView*>(GetPageActionView(page_action)); | 492 static_cast<PageActionWithBadgeView*>(GetPageActionView(page_action)); |
493 DCHECK(page_action_view); | 493 DCHECK(page_action_view); |
494 if (!page_action_view) | 494 if (!page_action_view) |
495 return; | 495 return; |
496 | 496 |
497 page_action_view->image_view()->set_preview_enabled(preview_enabled); | 497 page_action_view->image_view()->set_preview_enabled(preview_enabled); |
498 page_action_view->UpdateVisibility(contents, GURL(model_->GetText())); | 498 page_action_view->UpdateVisibility(contents, model_->GetURL()); |
499 Layout(); | 499 Layout(); |
500 SchedulePaint(); | 500 SchedulePaint(); |
501 } | 501 } |
502 | 502 |
503 views::View* LocationBarView::GetPageActionView(ExtensionAction *page_action) { | 503 views::View* LocationBarView::GetPageActionView(ExtensionAction *page_action) { |
504 DCHECK(page_action); | 504 DCHECK(page_action); |
505 for (PageActionViews::const_iterator i(page_action_views_.begin()); | 505 for (PageActionViews::const_iterator i(page_action_views_.begin()); |
506 i != page_action_views_.end(); ++i) { | 506 i != page_action_views_.end(); ++i) { |
507 if ((*i)->image_view()->page_action() == page_action) | 507 if ((*i)->image_view()->page_action() == page_action) |
508 return *i; | 508 return *i; |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 } | 1516 } |
1517 | 1517 |
1518 void LocationBarView::CleanupFadeAnimation() { | 1518 void LocationBarView::CleanupFadeAnimation() { |
1519 // Since we're no longer animating we don't need our layer. | 1519 // Since we're no longer animating we don't need our layer. |
1520 SetPaintToLayer(false); | 1520 SetPaintToLayer(false); |
1521 // Bubble labels don't need a transparent background anymore. | 1521 // Bubble labels don't need a transparent background anymore. |
1522 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1522 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
1523 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1523 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
1524 } | 1524 } |
1525 #endif // USE_AURA | 1525 #endif // USE_AURA |
OLD | NEW |