| 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 0, kInnerPadding); | 551 0, kInnerPadding); |
| 552 gtk_container_add(GTK_CONTAINER(alignment), action_box_button_->widget()); | 552 gtk_container_add(GTK_CONTAINER(alignment), action_box_button_->widget()); |
| 553 | 553 |
| 554 gtk_box_pack_end(GTK_BOX(hbox_.get()), alignment, | 554 gtk_box_pack_end(GTK_BOX(hbox_.get()), alignment, |
| 555 FALSE, FALSE, 0); | 555 FALSE, FALSE, 0); |
| 556 } else if (browser_defaults::bookmarks_enabled && !ShouldOnlyShowLocation()) { | 556 } else if (browser_defaults::bookmarks_enabled && !ShouldOnlyShowLocation()) { |
| 557 // Hide the star and Chrome To Mobile icons in popups, app windows, etc. | 557 // Hide the star and Chrome To Mobile icons in popups, app windows, etc. |
| 558 CreateStarButton(); | 558 CreateStarButton(); |
| 559 gtk_box_pack_end(GTK_BOX(hbox_.get()), star_.get(), FALSE, FALSE, 0); | 559 gtk_box_pack_end(GTK_BOX(hbox_.get()), star_.get(), FALSE, FALSE, 0); |
| 560 | 560 |
| 561 // Also disable Chrome To Mobile for off-the-record and non-synced profiles, | 561 // Disable Chrome To Mobile for off-the-record and non-synced profiles, |
| 562 // or if the feature is disabled by a command line flag or chrome://flags. | 562 // or if the feature is disabled by a command line flag or chrome://flags. |
| 563 if (!profile->IsOffTheRecord() && profile->IsSyncAccessible() && | 563 if (!profile->IsOffTheRecord() && profile->IsSyncAccessible() && |
| 564 ChromeToMobileService::IsChromeToMobileEnabled()) { | 564 ChromeToMobileService::IsChromeToMobileEnabled()) { |
| 565 CreateChromeToMobileButton(); | 565 CreateChromeToMobileButton(); |
| 566 gtk_box_pack_end(GTK_BOX(hbox_.get()), chrome_to_mobile_view_.get(), | 566 gtk_box_pack_end(GTK_BOX(hbox_.get()), chrome_to_mobile_view_.get(), |
| 567 FALSE, FALSE, 0); | 567 FALSE, FALSE, 0); |
| 568 command_updater_->AddCommandObserver(IDC_CHROME_TO_MOBILE_PAGE, this); | 568 command_updater_->AddCommandObserver(IDC_CHROME_TO_MOBILE_PAGE, this); |
| 569 ChromeToMobileServiceFactory::GetForProfile(browser_->profile())-> | 569 UpdateChromeToMobileIcon(); |
| 570 RequestMobileListUpdate(); | |
| 571 } | 570 } |
| 572 } | 571 } |
| 573 | 572 |
| 574 // TODO(khorimoto): Uncomment the following 2 lines when zoom icon/bubble | 573 // TODO(khorimoto): Uncomment the following 2 lines when zoom icon/bubble |
| 575 // implementation is complete for M23. | 574 // implementation is complete for M23. |
| 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(), |
| (...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |