Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h

Issue 1436583002: Revert of Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index b2adbb3277de4fc5e02516ad72fcea464943ac90..692a360e58fb85d5356f86a52090f2f7be70a207 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -17,6 +17,7 @@
#include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
#include "chrome/browser/ui/location_bar/location_bar.h"
#include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h"
+#include "chrome/browser/ui/search/search_model_observer.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/ui/zoom/zoom_event_manager_observer.h"
@@ -28,6 +29,7 @@
class LocationBarDecoration;
class LocationIconDecoration;
class ManagePasswordsDecoration;
+class MicSearchDecoration;
class PageActionDecoration;
class Profile;
class SelectedKeywordDecoration;
@@ -43,6 +45,7 @@
class LocationBarViewMac : public LocationBar,
public LocationBarTesting,
public ChromeOmniboxEditController,
+ public SearchModelObserver,
public ui_zoom::ZoomEventManagerObserver {
public:
LocationBarViewMac(AutocompleteTextField* field,
@@ -169,6 +172,10 @@
return manage_passwords_decoration_.get();
}
+ // SearchModelObserver:
+ void ModelChanged(const SearchModel::State& old_state,
+ const SearchModel::State& new_state) override;
+
Browser* browser() const { return browser_; }
// ZoomManagerObserver:
@@ -212,6 +219,10 @@
// Returns whether any updates were made.
bool UpdateZoomDecoration(bool default_zoom_changed);
+ // Updates the voice search decoration. Returns true if the visible state was
+ // changed.
+ bool UpdateMicSearchDecorationVisibility();
+
scoped_ptr<OmniboxViewMac> omnibox_view_;
AutocompleteTextField* field_; // owned by tab controller
@@ -245,6 +256,9 @@
// Keyword hint decoration displayed on the right-hand side.
scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_;
+ // The voice search icon.
+ scoped_ptr<MicSearchDecoration> mic_search_decoration_;
+
// The right-hand-side button to manage passwords associated with a page.
scoped_ptr<ManagePasswordsDecoration> manage_passwords_decoration_;
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698