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