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" |
11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/app/chrome_command_ids.h" | 13 #include "chrome/app/chrome_command_ids.h" |
14 #include "chrome/browser/alternate_nav_url_fetcher.h" | 14 #include "chrome/browser/alternate_nav_url_fetcher.h" |
15 #import "chrome/browser/app_controller_mac.h" | 15 #import "chrome/browser/app_controller_mac.h" |
16 #include "chrome/browser/chrome_to_mobile_service.h" | 16 #include "chrome/browser/chrome_to_mobile_service.h" |
17 #include "chrome/browser/chrome_to_mobile_service_factory.h" | 17 #include "chrome/browser/chrome_to_mobile_service_factory.h" |
18 #include "chrome/browser/command_updater.h" | 18 #include "chrome/browser/command_updater.h" |
19 #include "chrome/browser/defaults.h" | 19 #include "chrome/browser/defaults.h" |
20 #include "chrome/browser/extensions/api/tabs/tabs.h" | 20 #include "chrome/browser/extensions/api/tabs/tabs.h" |
21 #include "chrome/browser/extensions/extension_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
22 #include "chrome/browser/extensions/location_bar_controller.h" | 22 #include "chrome/browser/extensions/location_bar_controller.h" |
23 #include "chrome/browser/extensions/tab_helper.h" | 23 #include "chrome/browser/extensions/tab_helper.h" |
24 #include "chrome/browser/instant/instant_controller.h" | |
25 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
26 #include "chrome/browser/search_engines/template_url.h" | 25 #include "chrome/browser/search_engines/template_url.h" |
27 #include "chrome/browser/search_engines/template_url_service.h" | 26 #include "chrome/browser/search_engines/template_url_service.h" |
28 #include "chrome/browser/search_engines/template_url_service_factory.h" | 27 #include "chrome/browser/search_engines/template_url_service_factory.h" |
29 #include "chrome/browser/ui/browser_instant_controller.h" | 28 #include "chrome/browser/ui/browser_instant_controller.h" |
30 #include "chrome/browser/ui/browser_list.h" | 29 #include "chrome/browser/ui/browser_list.h" |
31 #include "chrome/browser/ui/browser_tabstrip.h" | 30 #include "chrome/browser/ui/browser_tabstrip.h" |
32 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" | 31 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" |
33 #include "chrome/browser/ui/cocoa/event_utils.h" | 32 #include "chrome/browser/ui/cocoa/event_utils.h" |
34 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" | 33 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 void LocationBarViewMac::UpdateChromeToMobileEnabled() { | 726 void LocationBarViewMac::UpdateChromeToMobileEnabled() { |
728 if (!chrome_to_mobile_decoration_.get()) | 727 if (!chrome_to_mobile_decoration_.get()) |
729 return; | 728 return; |
730 | 729 |
731 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); | 730 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); |
732 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && | 731 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && |
733 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles(); | 732 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles(); |
734 chrome_to_mobile_decoration_->SetVisible(enabled); | 733 chrome_to_mobile_decoration_->SetVisible(enabled); |
735 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); | 734 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); |
736 } | 735 } |
OLD | NEW |