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

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

Issue 173194: [Mac] Omnibox keyword, keyword hint, and search hint support.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 4 months 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/cocoa/location_bar_view_mac.h
===================================================================
--- chrome/browser/cocoa/location_bar_view_mac.h (revision 23951)
+++ chrome/browser/cocoa/location_bar_view_mac.h (working copy)
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
+#include "base/scoped_nsobject.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h"
@@ -14,6 +15,7 @@
@class AutocompleteTextField;
class CommandUpdater;
+class Profile;
class ToolbarModel;
// A C++ bridge class that represents the location bar UI element to
@@ -65,11 +67,25 @@
virtual SkBitmap GetFavIcon() const;
virtual std::wstring GetTitle() const;
+ NSImage* GetTabButtonImage();
+
+ // Internals of OnChanged(), pulled out for purposes of unit
+ // testing. Sets up |field| based on the parameters, which are
+ // pulled from edit_view->model().
+ static void OnChangedImpl(AutocompleteTextField* field,
+ const std::wstring& keyword,
+ const std::wstring& short_name,
+ const bool is_keyword_hint,
+ const bool show_search_hint,
+ NSImage* image);
+
private:
scoped_ptr<AutocompleteEditViewMac> edit_view_;
CommandUpdater* command_updater_; // Weak, owned by Browser.
+ AutocompleteTextField* field_; // owned by tab controller
+
// When we get an OnAutocompleteAccept notification from the autocomplete
// edit, we save the input string so we can give it back to the browser on
// the LocationBar interface via GetInputString().
@@ -78,6 +94,11 @@
// The user's desired disposition for how their input should be opened.
WindowOpenDisposition disposition_;
+ Profile* profile_;
+
+ // Image used in drawing keyword hint.
+ scoped_nsobject<NSImage> tab_button_image_;
+
// The transition type to use for the navigation.
PageTransition::Type transition_;
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field_unittest.mm ('k') | chrome/browser/cocoa/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698