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

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

Issue 2668833003: DialogBrowserTest implementation to invoke Content settings bubble dialogs. (Closed)
Patch Set: Updates from feedback Created 3 years, 10 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 (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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 } 1069 }
1070 1070
1071 NOTREACHED(); 1071 NOTREACHED();
1072 } 1072 }
1073 1073
1074 bool LocationBarView::GetBookmarkStarVisibility() { 1074 bool LocationBarView::GetBookmarkStarVisibility() {
1075 DCHECK(star_view_); 1075 DCHECK(star_view_);
1076 return star_view_->visible(); 1076 return star_view_->visible();
1077 } 1077 }
1078 1078
1079 bool LocationBarView::TestContentSettingImagePressed(size_t index) {
1080 if (index >= content_setting_views_.size())
1081 return false;
1082
1083 views::View* image_view = content_setting_views_[index];
Peter Kasting 2017/02/08 01:00:03 Nit: Could just inline into next line
kylix_rd 2017/02/10 22:47:48 Done.
kylix_rd 2017/02/13 17:34:54 Reverted. OnKeyPressed is moved to the protected
1084 image_view->OnKeyPressed(
1085 ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, ui::EF_NONE));
Peter Kasting 2017/02/08 01:00:03 Nit: Wrong indentation (should be 4) (git cl forma
kylix_rd 2017/02/10 22:47:48 Done.
1086 return true;
1087 }
1088
1079 //////////////////////////////////////////////////////////////////////////////// 1089 ////////////////////////////////////////////////////////////////////////////////
1080 // LocationBarView, private views::View implementation: 1090 // LocationBarView, private views::View implementation:
1081 1091
1082 const char* LocationBarView::GetClassName() const { 1092 const char* LocationBarView::GetClassName() const {
1083 return kViewClassName; 1093 return kViewClassName;
1084 } 1094 }
1085 1095
1086 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 1096 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
1087 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view(); 1097 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view();
1088 if (popup->IsOpen()) 1098 if (popup->IsOpen())
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 // LocationBarView, private TemplateURLServiceObserver implementation: 1200 // LocationBarView, private TemplateURLServiceObserver implementation:
1191 1201
1192 void LocationBarView::OnTemplateURLServiceChanged() { 1202 void LocationBarView::OnTemplateURLServiceChanged() {
1193 template_url_service_->RemoveObserver(this); 1203 template_url_service_->RemoveObserver(this);
1194 template_url_service_ = nullptr; 1204 template_url_service_ = nullptr;
1195 // If the browser is no longer active, let's not show the info bubble, as this 1205 // If the browser is no longer active, let's not show the info bubble, as this
1196 // would make the browser the active window again. 1206 // would make the browser the active window again.
1197 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1207 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1198 ShowFirstRunBubble(); 1208 ShowFirstRunBubble();
1199 } 1209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698