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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 11040055: Adds a FakeToolbarModel for use in testing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: git try Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 68bdedd3bcd4fc8f6263b4cdab35e89a20177f55..cfc5ac25f41997433becb37cea31f4ca8b0c532e 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -860,9 +860,9 @@ void LocationBarViewGtk::OnInputInProgress(bool in_progress) {
// This is identical to the Windows code, except that we don't proxy the call
// back through the Toolbar, and just access the model here.
// The edit should make sure we're only notified when something changes.
- DCHECK(toolbar_model_->input_in_progress() != in_progress);
+ DCHECK(toolbar_model_->GetInputInProgress() != in_progress);
- toolbar_model_->set_input_in_progress(in_progress);
+ toolbar_model_->SetInputInProgress(in_progress);
Update(NULL);
}
@@ -948,7 +948,7 @@ void LocationBarViewGtk::UpdateContentSettingsIcons() {
content_setting_views_.begin());
i != content_setting_views_.end(); ++i) {
(*i)->Update(
- toolbar_model_->input_in_progress() ? NULL : GetTabContents());
+ toolbar_model_->GetInputInProgress() ? NULL : GetTabContents());
any_visible = (*i)->IsVisible() || any_visible;
}
@@ -991,7 +991,7 @@ void LocationBarViewGtk::UpdatePageActions() {
for (size_t i = 0; i < page_action_views_.size(); i++) {
page_action_views_[i]->UpdateVisibility(
- toolbar_model_->input_in_progress() ? NULL : contents, url);
+ toolbar_model_->GetInputInProgress() ? NULL : contents, url);
}
gtk_widget_queue_draw(hbox_.get());
}
@@ -1536,7 +1536,7 @@ gboolean LocationBarViewGtk::OnStarButtonPress(GtkWidget* widget,
}
void LocationBarViewGtk::ShowZoomBubble() {
- if (!zoom_.get() || toolbar_model_->input_in_progress())
+ if (!zoom_.get() || toolbar_model_->GetInputInProgress())
return;
ZoomBubbleGtk::Show(zoom_.get(), GetTabContents(), true);
@@ -1584,7 +1584,7 @@ void LocationBarViewGtk::UpdateZoomIcon() {
ZoomController* zoom_controller =
ZoomController::FromWebContents(tab_contents->web_contents());
if (!zoom_controller || zoom_controller->IsAtDefaultZoom() ||
- toolbar_model_->input_in_progress()) {
+ toolbar_model_->GetInputInProgress()) {
gtk_widget_hide(zoom_.get());
ZoomBubbleGtk::Close();
return;
@@ -1607,7 +1607,7 @@ void LocationBarViewGtk::UpdateStarIcon() {
// Indicate the star icon is not correctly sized. It will be marked as sized
// when the next size-allocate signal is received by the star widget.
star_sized_ = false;
- bool star_enabled = !toolbar_model_->input_in_progress() &&
+ bool star_enabled = !toolbar_model_->GetInputInProgress() &&
edit_bookmarks_enabled_.GetValue();
command_updater_->UpdateCommandEnabled(IDC_BOOKMARK_PAGE, star_enabled);
if (extensions::switch_utils::IsActionBoxEnabled() && !starred_) {
@@ -1627,7 +1627,8 @@ void LocationBarViewGtk::UpdateChromeToMobileState() {
ChromeToMobileService* service =
ChromeToMobileServiceFactory::GetForProfile(browser()->profile());
command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE,
- !toolbar_model_->input_in_progress() && service && service->HasMobiles());
+ !toolbar_model_->GetInputInProgress() &&
+ service && service->HasMobiles());
}
bool LocationBarViewGtk::ShouldOnlyShowLocation() {
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm ('k') | chrome/browser/ui/search/toolbar_search_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698