| 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/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 if (was_visible != (*i)->visible()) | 884 if (was_visible != (*i)->visible()) |
| 885 visibility_changed = true; | 885 visibility_changed = true; |
| 886 } | 886 } |
| 887 return visibility_changed; | 887 return visibility_changed; |
| 888 } | 888 } |
| 889 | 889 |
| 890 void LocationBarView::DeletePageActionViews() { | 890 void LocationBarView::DeletePageActionViews() { |
| 891 for (PageActionViews::const_iterator i(page_action_views_.begin()); | 891 for (PageActionViews::const_iterator i(page_action_views_.begin()); |
| 892 i != page_action_views_.end(); ++i) | 892 i != page_action_views_.end(); ++i) |
| 893 RemoveChildView(*i); | 893 RemoveChildView(*i); |
| 894 STLDeleteElements(&page_action_views_); | 894 base::STLDeleteElements(&page_action_views_); |
| 895 } | 895 } |
| 896 | 896 |
| 897 bool LocationBarView::RefreshPageActionViews() { | 897 bool LocationBarView::RefreshPageActionViews() { |
| 898 if (is_popup_mode_) | 898 if (is_popup_mode_) |
| 899 return false; | 899 return false; |
| 900 | 900 |
| 901 bool changed = false; | 901 bool changed = false; |
| 902 PageActions new_page_actions; | 902 PageActions new_page_actions; |
| 903 | 903 |
| 904 WebContents* web_contents = GetWebContents(); | 904 WebContents* web_contents = GetWebContents(); |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 // LocationBarView, private TemplateURLServiceObserver implementation: | 1385 // LocationBarView, private TemplateURLServiceObserver implementation: |
| 1386 | 1386 |
| 1387 void LocationBarView::OnTemplateURLServiceChanged() { | 1387 void LocationBarView::OnTemplateURLServiceChanged() { |
| 1388 template_url_service_->RemoveObserver(this); | 1388 template_url_service_->RemoveObserver(this); |
| 1389 template_url_service_ = nullptr; | 1389 template_url_service_ = nullptr; |
| 1390 // If the browser is no longer active, let's not show the info bubble, as this | 1390 // If the browser is no longer active, let's not show the info bubble, as this |
| 1391 // would make the browser the active window again. | 1391 // would make the browser the active window again. |
| 1392 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1392 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
| 1393 ShowFirstRunBubble(); | 1393 ShowFirstRunBubble(); |
| 1394 } | 1394 } |
| OLD | NEW |