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