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

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: Fixed nits and added enum element per recommendation. 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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 } 1067 }
1068 1068
1069 NOTREACHED(); 1069 NOTREACHED();
1070 } 1070 }
1071 1071
1072 bool LocationBarView::GetBookmarkStarVisibility() { 1072 bool LocationBarView::GetBookmarkStarVisibility() {
1073 DCHECK(star_view_); 1073 DCHECK(star_view_);
1074 return star_view_->visible(); 1074 return star_view_->visible();
1075 } 1075 }
1076 1076
1077 bool LocationBarView::TestContentSettingImagePressed(size_t index) {
1078 if (index >= content_setting_views_.size())
1079 return false;
1080
1081 content_setting_views_[index]->OnKeyPressed(
1082 ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, ui::EF_NONE));
1083 return true;
1084 }
1085
1077 //////////////////////////////////////////////////////////////////////////////// 1086 ////////////////////////////////////////////////////////////////////////////////
1078 // LocationBarView, private views::View implementation: 1087 // LocationBarView, private views::View implementation:
1079 1088
1080 const char* LocationBarView::GetClassName() const { 1089 const char* LocationBarView::GetClassName() const {
1081 return kViewClassName; 1090 return kViewClassName;
1082 } 1091 }
1083 1092
1084 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 1093 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
1085 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view(); 1094 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view();
1086 if (popup->IsOpen()) 1095 if (popup->IsOpen())
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 // LocationBarView, private TemplateURLServiceObserver implementation: 1197 // LocationBarView, private TemplateURLServiceObserver implementation:
1189 1198
1190 void LocationBarView::OnTemplateURLServiceChanged() { 1199 void LocationBarView::OnTemplateURLServiceChanged() {
1191 template_url_service_->RemoveObserver(this); 1200 template_url_service_->RemoveObserver(this);
1192 template_url_service_ = nullptr; 1201 template_url_service_ = nullptr;
1193 // If the browser is no longer active, let's not show the info bubble, as this 1202 // If the browser is no longer active, let's not show the info bubble, as this
1194 // would make the browser the active window again. 1203 // would make the browser the active window again.
1195 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1204 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1196 ShowFirstRunBubble(); 1205 ShowFirstRunBubble();
1197 } 1206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698