| OLD | NEW |
| 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 0, kInnerPadding); | 553 0, kInnerPadding); |
| 554 gtk_container_add(GTK_CONTAINER(alignment), action_box_button_->widget()); | 554 gtk_container_add(GTK_CONTAINER(alignment), action_box_button_->widget()); |
| 555 | 555 |
| 556 gtk_box_pack_end(GTK_BOX(hbox_.get()), alignment, | 556 gtk_box_pack_end(GTK_BOX(hbox_.get()), alignment, |
| 557 FALSE, FALSE, 0); | 557 FALSE, FALSE, 0); |
| 558 } else if (browser_defaults::bookmarks_enabled && !ShouldOnlyShowLocation()) { | 558 } else if (browser_defaults::bookmarks_enabled && !ShouldOnlyShowLocation()) { |
| 559 // Hide the star and Chrome To Mobile icons in popups, app windows, etc. | 559 // Hide the star and Chrome To Mobile icons in popups, app windows, etc. |
| 560 CreateStarButton(); | 560 CreateStarButton(); |
| 561 gtk_box_pack_end(GTK_BOX(hbox_.get()), star_.get(), FALSE, FALSE, 0); | 561 gtk_box_pack_end(GTK_BOX(hbox_.get()), star_.get(), FALSE, FALSE, 0); |
| 562 | 562 |
| 563 // Also disable Chrome To Mobile for off-the-record and non-synced profiles, | 563 // Disable Chrome To Mobile for off-the-record and non-synced profiles, |
| 564 // or if the feature is disabled by a command line flag or chrome://flags. | 564 // or if the feature is disabled by a command line flag or chrome://flags. |
| 565 if (!profile->IsOffTheRecord() && profile->IsSyncAccessible() && | 565 if (!profile->IsOffTheRecord() && profile->IsSyncAccessible() && |
| 566 ChromeToMobileService::IsChromeToMobileEnabled()) { | 566 ChromeToMobileService::IsChromeToMobileEnabled()) { |
| 567 CreateChromeToMobileButton(); | 567 CreateChromeToMobileButton(); |
| 568 gtk_box_pack_end(GTK_BOX(hbox_.get()), chrome_to_mobile_view_.get(), | 568 gtk_box_pack_end(GTK_BOX(hbox_.get()), chrome_to_mobile_view_.get(), |
| 569 FALSE, FALSE, 0); | 569 FALSE, FALSE, 0); |
| 570 command_updater_->AddCommandObserver(IDC_CHROME_TO_MOBILE_PAGE, this); | 570 command_updater_->AddCommandObserver(IDC_CHROME_TO_MOBILE_PAGE, this); |
| 571 ChromeToMobileServiceFactory::GetForProfile(browser_->profile())-> | 571 UpdateChromeToMobileIcon(); |
| 572 RequestMobileListUpdate(); | |
| 573 } | 572 } |
| 574 } | 573 } |
| 575 | 574 |
| 576 CreateZoomButton(); | 575 CreateZoomButton(); |
| 577 gtk_box_pack_end(GTK_BOX(hbox_.get()), zoom_.get(), FALSE, FALSE, 0); | 576 gtk_box_pack_end(GTK_BOX(hbox_.get()), zoom_.get(), FALSE, FALSE, 0); |
| 578 | 577 |
| 579 content_setting_hbox_.Own(gtk_hbox_new(FALSE, kInnerPadding + 1)); | 578 content_setting_hbox_.Own(gtk_hbox_new(FALSE, kInnerPadding + 1)); |
| 580 gtk_widget_set_name(content_setting_hbox_.get(), | 579 gtk_widget_set_name(content_setting_hbox_.get(), |
| 581 "chrome-content-setting-hbox"); | 580 "chrome-content-setting-hbox"); |
| 582 gtk_box_pack_end(GTK_BOX(hbox_.get()), content_setting_hbox_.get(), | 581 gtk_box_pack_end(GTK_BOX(hbox_.get()), content_setting_hbox_.get(), |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 } | 2131 } |
| 2133 | 2132 |
| 2134 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( | 2133 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( |
| 2135 ExtensionAction* action) { | 2134 ExtensionAction* action) { |
| 2136 ExtensionPopupGtk::Show( | 2135 ExtensionPopupGtk::Show( |
| 2137 action->GetPopupUrl(current_tab_id_), | 2136 action->GetPopupUrl(current_tab_id_), |
| 2138 owner_->browser_, | 2137 owner_->browser_, |
| 2139 event_box_.get(), | 2138 event_box_.get(), |
| 2140 ExtensionPopupGtk::SHOW_AND_INSPECT); | 2139 ExtensionPopupGtk::SHOW_AND_INSPECT); |
| 2141 } | 2140 } |
| OLD | NEW |