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

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

Issue 10908157: Integrate ChromeToMobile with GTK Action Box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 8 years, 3 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 bb9989883d9099f9bf3a1e33d6604ea922fbcb5f..f8358dc66403ea4c319ee37b9bfbd96b6b2921fb 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -725,6 +725,7 @@ GtkWidget* LocationBarViewGtk::GetPageActionWidget(
void LocationBarViewGtk::Update(const WebContents* contents) {
UpdateZoomIcon();
UpdateStarIcon();
+ UpdateChromeToMobileState();
UpdateSiteTypeArea();
UpdateContentSettingsIcons();
UpdatePageActions();
@@ -1506,9 +1507,7 @@ void LocationBarViewGtk::ShowStarBubble(const GURL& url,
}
void LocationBarViewGtk::ShowChromeToMobileBubble() {
- // TODO(msw): Chrome to Mobile is currently disabled on GTK.
- // ChromeToMobileBubbleGtk::Show(GTK_WIDGET(action_box_button_->widget()),
- // browser_);
+ ChromeToMobileBubbleGtk::Show(action_box_button_->widget(), browser_);
}
void LocationBarViewGtk::SetStarred(bool starred) {
@@ -1572,6 +1571,13 @@ void LocationBarViewGtk::UpdateStarIcon() {
}
}
+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());
+}
+
bool LocationBarViewGtk::ShouldOnlyShowLocation() {
return !browser_->is_type_tabbed();
}

Powered by Google App Engine
This is Rietveld 408576698