OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "chrome/common/chrome_switches.h" | 60 #include "chrome/common/chrome_switches.h" |
61 #include "chrome/common/pref_names.h" | 61 #include "chrome/common/pref_names.h" |
62 #include "components/search_engines/template_url.h" | 62 #include "components/search_engines/template_url.h" |
63 #include "components/search_engines/template_url_service.h" | 63 #include "components/search_engines/template_url_service.h" |
64 #include "components/translate/core/browser/language_state.h" | 64 #include "components/translate/core/browser/language_state.h" |
65 #include "content/public/browser/notification_service.h" | 65 #include "content/public/browser/notification_service.h" |
66 #include "content/public/browser/web_contents.h" | 66 #include "content/public/browser/web_contents.h" |
67 #include "extensions/browser/extension_system.h" | 67 #include "extensions/browser/extension_system.h" |
68 #include "extensions/common/extension.h" | 68 #include "extensions/common/extension.h" |
69 #include "extensions/common/permissions/permissions_data.h" | 69 #include "extensions/common/permissions/permissions_data.h" |
| 70 #include "grit/component_scaled_resources.h" |
70 #include "grit/generated_resources.h" | 71 #include "grit/generated_resources.h" |
71 #include "grit/theme_resources.h" | 72 #include "grit/theme_resources.h" |
72 #include "net/base/net_util.h" | 73 #include "net/base/net_util.h" |
73 #include "skia/ext/skia_utils_mac.h" | 74 #include "skia/ext/skia_utils_mac.h" |
74 #import "ui/base/cocoa/cocoa_base_utils.h" | 75 #import "ui/base/cocoa/cocoa_base_utils.h" |
75 #include "ui/base/l10n/l10n_util_mac.h" | 76 #include "ui/base/l10n/l10n_util_mac.h" |
76 #include "ui/base/resource/resource_bundle.h" | 77 #include "ui/base/resource/resource_bundle.h" |
77 #include "ui/gfx/image/image.h" | 78 #include "ui/gfx/image/image.h" |
78 | 79 |
79 using content::WebContents; | 80 using content::WebContents; |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 } | 786 } |
786 | 787 |
787 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 788 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
788 bool is_visible = !GetToolbarModel()->input_in_progress() && | 789 bool is_visible = !GetToolbarModel()->input_in_progress() && |
789 browser_->search_model()->voice_search_supported(); | 790 browser_->search_model()->voice_search_supported(); |
790 if (mic_search_decoration_->IsVisible() == is_visible) | 791 if (mic_search_decoration_->IsVisible() == is_visible) |
791 return false; | 792 return false; |
792 mic_search_decoration_->SetVisible(is_visible); | 793 mic_search_decoration_->SetVisible(is_visible); |
793 return true; | 794 return true; |
794 } | 795 } |
OLD | NEW |