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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #import "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 52 #import "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
53 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 53 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
54 #include "chrome/common/chrome_notification_types.h" | 54 #include "chrome/common/chrome_notification_types.h" |
55 #include "chrome/common/extensions/extension.h" | 55 #include "chrome/common/extensions/extension.h" |
56 #include "chrome/common/extensions/extension_action.h" | 56 #include "chrome/common/extensions/extension_action.h" |
57 #include "chrome/common/extensions/extension_resource.h" | 57 #include "chrome/common/extensions/extension_resource.h" |
58 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
59 #include "content/public/browser/notification_service.h" | 59 #include "content/public/browser/notification_service.h" |
60 #include "content/public/browser/web_contents.h" | 60 #include "content/public/browser/web_contents.h" |
61 #include "grit/generated_resources.h" | 61 #include "grit/generated_resources.h" |
62 #include "grit/theme_resources_standard.h" | 62 #include "grit/theme_resources.h" |
63 #include "net/base/net_util.h" | 63 #include "net/base/net_util.h" |
64 #include "skia/ext/skia_utils_mac.h" | 64 #include "skia/ext/skia_utils_mac.h" |
65 #include "third_party/skia/include/core/SkBitmap.h" | 65 #include "third_party/skia/include/core/SkBitmap.h" |
66 #include "ui/base/l10n/l10n_util_mac.h" | 66 #include "ui/base/l10n/l10n_util_mac.h" |
67 #include "ui/base/resource/resource_bundle.h" | 67 #include "ui/base/resource/resource_bundle.h" |
68 | 68 |
69 using content::WebContents; | 69 using content::WebContents; |
70 | 70 |
71 namespace { | 71 namespace { |
72 | 72 |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 void LocationBarViewMac::UpdateChromeToMobileEnabled() { | 719 void LocationBarViewMac::UpdateChromeToMobileEnabled() { |
720 if (!chrome_to_mobile_decoration_.get()) | 720 if (!chrome_to_mobile_decoration_.get()) |
721 return; | 721 return; |
722 | 722 |
723 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); | 723 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); |
724 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && | 724 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && |
725 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasDevices(); | 725 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasDevices(); |
726 chrome_to_mobile_decoration_->SetVisible(enabled); | 726 chrome_to_mobile_decoration_->SetVisible(enabled); |
727 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); | 727 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); |
728 } | 728 } |
OLD | NEW |