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 // Disable Chrome To Mobile for off-the-record and non-synced profiles, | 563 // Also 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 UpdateChromeToMobileIcon(); | 571 ChromeToMobileServiceFactory::GetForProfile(browser_->profile())-> |
| 572 RequestMobileListUpdate(); |
572 } | 573 } |
573 } | 574 } |
574 | 575 |
575 // TODO(khorimoto): Uncomment the following 2 lines when zoom icon/bubble | 576 // TODO(khorimoto): Uncomment the following 2 lines when zoom icon/bubble |
576 // implementation is complete for M23. | 577 // implementation is complete for M23. |
577 // CreateZoomButton(); | 578 // CreateZoomButton(); |
578 // gtk_box_pack_end(GTK_BOX(hbox_.get()), zoom_.get(), FALSE, FALSE, 0); | 579 // gtk_box_pack_end(GTK_BOX(hbox_.get()), zoom_.get(), FALSE, FALSE, 0); |
579 | 580 |
580 content_setting_hbox_.Own(gtk_hbox_new(FALSE, kInnerPadding + 1)); | 581 content_setting_hbox_.Own(gtk_hbox_new(FALSE, kInnerPadding + 1)); |
581 gtk_widget_set_name(content_setting_hbox_.get(), | 582 gtk_widget_set_name(content_setting_hbox_.get(), |
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 } | 2136 } |
2136 | 2137 |
2137 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( | 2138 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( |
2138 ExtensionAction* action) { | 2139 ExtensionAction* action) { |
2139 ExtensionPopupGtk::Show( | 2140 ExtensionPopupGtk::Show( |
2140 action->GetPopupUrl(current_tab_id_), | 2141 action->GetPopupUrl(current_tab_id_), |
2141 owner_->browser_, | 2142 owner_->browser_, |
2142 event_box_.get(), | 2143 event_box_.get(), |
2143 ExtensionPopupGtk::SHOW_AND_INSPECT); | 2144 ExtensionPopupGtk::SHOW_AND_INSPECT); |
2144 } | 2145 } |
OLD | NEW |