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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 !toolbar_model_->input_in_progress() && | 724 !toolbar_model_->input_in_progress() && |
725 edit_bookmarks_enabled_.GetValue(); | 725 edit_bookmarks_enabled_.GetValue(); |
726 } | 726 } |
727 | 727 |
728 void LocationBarViewMac::UpdateChromeToMobileEnabled() { | 728 void LocationBarViewMac::UpdateChromeToMobileEnabled() { |
729 if (!chrome_to_mobile_decoration_.get()) | 729 if (!chrome_to_mobile_decoration_.get()) |
730 return; | 730 return; |
731 | 731 |
732 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); | 732 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); |
733 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && | 733 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && |
734 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasDevices(); | 734 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles(); |
735 chrome_to_mobile_decoration_->SetVisible(enabled); | 735 chrome_to_mobile_decoration_->SetVisible(enabled); |
736 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); | 736 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); |
737 } | 737 } |
OLD | NEW |