| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #include "chrome/common/chrome_switches.h" | 57 #include "chrome/common/chrome_switches.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 "extensions/common/extension.h" | 61 #include "extensions/common/extension.h" |
| 62 #include "extensions/common/permissions/permissions_data.h" | 62 #include "extensions/common/permissions/permissions_data.h" |
| 63 #include "grit/generated_resources.h" | 63 #include "grit/generated_resources.h" |
| 64 #include "grit/theme_resources.h" | 64 #include "grit/theme_resources.h" |
| 65 #include "net/base/net_util.h" | 65 #include "net/base/net_util.h" |
| 66 #include "skia/ext/skia_utils_mac.h" | 66 #include "skia/ext/skia_utils_mac.h" |
| 67 #import "ui/base/cocoa/cocoa_event_utils.h" | 67 #import "ui/base/cocoa/cocoa_base_utils.h" |
| 68 #include "ui/base/l10n/l10n_util_mac.h" | 68 #include "ui/base/l10n/l10n_util_mac.h" |
| 69 #include "ui/base/resource/resource_bundle.h" | 69 #include "ui/base/resource/resource_bundle.h" |
| 70 #include "ui/gfx/image/image.h" | 70 #include "ui/gfx/image/image.h" |
| 71 | 71 |
| 72 using content::WebContents; | 72 using content::WebContents; |
| 73 | 73 |
| 74 namespace { | 74 namespace { |
| 75 | 75 |
| 76 // Vertical space between the bottom edge of the location_bar and the first run | 76 // Vertical space between the bottom edge of the location_bar and the first run |
| 77 // bubble arrow point. | 77 // bubble arrow point. |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 } | 744 } |
| 745 | 745 |
| 746 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { | 746 bool LocationBarViewMac::UpdateMicSearchDecorationVisibility() { |
| 747 bool is_visible = !GetToolbarModel()->input_in_progress() && | 747 bool is_visible = !GetToolbarModel()->input_in_progress() && |
| 748 browser_->search_model()->voice_search_supported(); | 748 browser_->search_model()->voice_search_supported(); |
| 749 if (mic_search_decoration_->IsVisible() == is_visible) | 749 if (mic_search_decoration_->IsVisible() == is_visible) |
| 750 return false; | 750 return false; |
| 751 mic_search_decoration_->SetVisible(is_visible); | 751 mic_search_decoration_->SetVisible(is_visible); |
| 752 return true; | 752 return true; |
| 753 } | 753 } |
| OLD | NEW |