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