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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 10834203: Integrate invalidation API into ChromeToMobileService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment; sync and rebase. Created 8 years, 4 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 | Annotate | Revision Log
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/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 0, kInnerPadding); 552 0, kInnerPadding);
553 gtk_container_add(GTK_CONTAINER(alignment), action_box_button_->widget()); 553 gtk_container_add(GTK_CONTAINER(alignment), action_box_button_->widget());
554 554
555 gtk_box_pack_end(GTK_BOX(hbox_.get()), alignment, 555 gtk_box_pack_end(GTK_BOX(hbox_.get()), alignment,
556 FALSE, FALSE, 0); 556 FALSE, FALSE, 0);
557 } else if (browser_defaults::bookmarks_enabled && !ShouldOnlyShowLocation()) { 557 } else if (browser_defaults::bookmarks_enabled && !ShouldOnlyShowLocation()) {
558 // Hide the star and Chrome To Mobile icons in popups, app windows, etc. 558 // Hide the star and Chrome To Mobile icons in popups, app windows, etc.
559 CreateStarButton(); 559 CreateStarButton();
560 gtk_box_pack_end(GTK_BOX(hbox_.get()), star_.get(), FALSE, FALSE, 0); 560 gtk_box_pack_end(GTK_BOX(hbox_.get()), star_.get(), FALSE, FALSE, 0);
561 561
562 // Also disable Chrome To Mobile for off-the-record and non-synced profiles, 562 // Disable Chrome To Mobile for off-the-record and non-synced profiles,
563 // or if the feature is disabled by a command line flag or chrome://flags. 563 // or if the feature is disabled by a command line flag or chrome://flags.
564 if (!profile->IsOffTheRecord() && profile->IsSyncAccessible() && 564 if (!profile->IsOffTheRecord() && profile->IsSyncAccessible() &&
565 ChromeToMobileService::IsChromeToMobileEnabled()) { 565 ChromeToMobileService::IsChromeToMobileEnabled()) {
566 CreateChromeToMobileButton(); 566 CreateChromeToMobileButton();
567 gtk_box_pack_end(GTK_BOX(hbox_.get()), chrome_to_mobile_view_.get(), 567 gtk_box_pack_end(GTK_BOX(hbox_.get()), chrome_to_mobile_view_.get(),
568 FALSE, FALSE, 0); 568 FALSE, FALSE, 0);
569 command_updater_->AddCommandObserver(IDC_CHROME_TO_MOBILE_PAGE, this); 569 command_updater_->AddCommandObserver(IDC_CHROME_TO_MOBILE_PAGE, this);
570 ChromeToMobileServiceFactory::GetForProfile(browser_->profile())-> 570 UpdateChromeToMobileIcon();
571 RequestMobileListUpdate();
572 } 571 }
573 } 572 }
574 573
575 // TODO(khorimoto): Uncomment the following 2 lines when zoom icon/bubble 574 // TODO(khorimoto): Uncomment the following 2 lines when zoom icon/bubble
576 // implementation is complete for M23. 575 // implementation is complete for M23.
577 // CreateZoomButton(); 576 // CreateZoomButton();
578 // gtk_box_pack_end(GTK_BOX(hbox_.get()), zoom_.get(), FALSE, FALSE, 0); 577 // gtk_box_pack_end(GTK_BOX(hbox_.get()), zoom_.get(), FALSE, FALSE, 0);
579 578
580 content_setting_hbox_.Own(gtk_hbox_new(FALSE, kInnerPadding + 1)); 579 content_setting_hbox_.Own(gtk_hbox_new(FALSE, kInnerPadding + 1));
581 gtk_widget_set_name(content_setting_hbox_.get(), 580 gtk_widget_set_name(content_setting_hbox_.get(),
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 } 2134 }
2136 2135
2137 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( 2136 void LocationBarViewGtk::PageActionViewGtk::InspectPopup(
2138 ExtensionAction* action) { 2137 ExtensionAction* action) {
2139 ExtensionPopupGtk::Show( 2138 ExtensionPopupGtk::Show(
2140 action->GetPopupUrl(current_tab_id_), 2139 action->GetPopupUrl(current_tab_id_),
2141 owner_->browser_, 2140 owner_->browser_,
2142 event_box_.get(), 2141 event_box_.get(),
2143 ExtensionPopupGtk::SHOW_AND_INSPECT); 2142 ExtensionPopupGtk::SHOW_AND_INSPECT);
2144 } 2143 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.cc ('k') | chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698