| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "chrome/common/pref_names.h" | 63 #include "chrome/common/pref_names.h" |
| 64 #include "components/search_engines/template_url.h" | 64 #include "components/search_engines/template_url.h" |
| 65 #include "components/search_engines/template_url_service.h" | 65 #include "components/search_engines/template_url_service.h" |
| 66 #include "components/translate/core/browser/language_state.h" | 66 #include "components/translate/core/browser/language_state.h" |
| 67 #include "content/public/browser/notification_service.h" | 67 #include "content/public/browser/notification_service.h" |
| 68 #include "content/public/browser/web_contents.h" | 68 #include "content/public/browser/web_contents.h" |
| 69 #include "extensions/browser/extension_system.h" | 69 #include "extensions/browser/extension_system.h" |
| 70 #include "extensions/common/extension.h" | 70 #include "extensions/common/extension.h" |
| 71 #include "extensions/common/permissions/permissions_data.h" | 71 #include "extensions/common/permissions/permissions_data.h" |
| 72 #include "grit/component_scaled_resources.h" | 72 #include "grit/component_scaled_resources.h" |
| 73 #include "grit/generated_resources.h" | |
| 74 #include "grit/theme_resources.h" | 73 #include "grit/theme_resources.h" |
| 75 #include "net/base/net_util.h" | 74 #include "net/base/net_util.h" |
| 76 #include "skia/ext/skia_utils_mac.h" | 75 #include "skia/ext/skia_utils_mac.h" |
| 77 #import "ui/base/cocoa/cocoa_base_utils.h" | 76 #import "ui/base/cocoa/cocoa_base_utils.h" |
| 78 #include "ui/base/l10n/l10n_util_mac.h" | 77 #include "ui/base/l10n/l10n_util_mac.h" |
| 79 #include "ui/gfx/image/image.h" | 78 #include "ui/gfx/image/image.h" |
| 80 | 79 |
| 81 using content::WebContents; | 80 using content::WebContents; |
| 82 | 81 |
| 83 namespace { | 82 namespace { |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 } | 804 } |
| 806 | 805 |
| 807 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 806 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
| 808 bool is_visible = !GetToolbarModel()->input_in_progress() && | 807 bool is_visible = !GetToolbarModel()->input_in_progress() && |
| 809 browser_->search_model()->voice_search_supported(); | 808 browser_->search_model()->voice_search_supported(); |
| 810 if (mic_search_decoration_->IsVisible() == is_visible) | 809 if (mic_search_decoration_->IsVisible() == is_visible) |
| 811 return false; | 810 return false; |
| 812 mic_search_decoration_->SetVisible(is_visible); | 811 mic_search_decoration_->SetVisible(is_visible); |
| 813 return true; | 812 return true; |
| 814 } | 813 } |
| OLD | NEW |