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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h

Issue 10810062: Moving common code into OmniboxView from OmniboxView* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More win fixes Created 8 years, 5 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/ui/cocoa/omnibox/omnibox_view_mac.h
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
index 4ef8c07ed4da6b7b36b84ddbb0797f97644efab9..d826e7eb03d978e02dbafc27ad3319f9df94a8e5 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
@@ -12,10 +12,7 @@
#include "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
#include "chrome/browser/ui/omnibox/omnibox_view.h"
-class OmniboxEditController;
class OmniboxPopupViewMac;
-class Profile;
-class ToolbarModel;
namespace ui {
class Clipboard;
@@ -33,22 +30,10 @@ class OmniboxViewMac : public OmniboxView,
virtual ~OmniboxViewMac();
// OmniboxView:
- virtual OmniboxEditModel* model() OVERRIDE;
- virtual const OmniboxEditModel* model() const OVERRIDE;
virtual void SaveStateToTab(content::WebContents* tab) OVERRIDE;
virtual void Update(
const content::WebContents* tab_for_state_restoring) OVERRIDE;
- virtual void OpenMatch(const AutocompleteMatch& match,
- WindowOpenDisposition disposition,
- const GURL& alternate_nav_url,
- size_t index) OVERRIDE;
virtual string16 GetText() const OVERRIDE;
- virtual bool IsEditingOrEmpty() const OVERRIDE;
- virtual int GetIcon() const OVERRIDE;
- virtual void SetUserText(const string16& text) OVERRIDE;
- virtual void SetUserText(const string16& text,
- const string16& display_text,
- bool update_popup) OVERRIDE;
virtual void SetWindowTextAndCaretPos(const string16& text,
size_t caret_pos,
bool update_popup,
@@ -61,7 +46,6 @@ class OmniboxViewMac : public OmniboxView,
virtual void SelectAll(bool reversed) OVERRIDE;
virtual void RevertAll() OVERRIDE;
virtual void UpdatePopup() OVERRIDE;
- virtual void ClosePopup() OVERRIDE;
virtual void SetFocus() OVERRIDE;
virtual void OnTemporaryTextMaybeChanged(
const string16& display_text,
@@ -74,7 +58,6 @@ class OmniboxViewMac : public OmniboxView,
virtual bool OnAfterPossibleChange() OVERRIDE;
virtual gfx::NativeView GetNativeView() const OVERRIDE;
virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE;
- virtual CommandUpdater* GetCommandUpdater() OVERRIDE;
virtual void SetInstantSuggestion(const string16& input,
bool animate_to_complete) OVERRIDE;
virtual string16 GetInstantSuggestion() const OVERRIDE;
@@ -92,6 +75,7 @@ class OmniboxViewMac : public OmniboxView,
virtual int GetPasteActionStringId() OVERRIDE;
virtual void OnPasteAndGo() OVERRIDE;
virtual void OnFrameChanged() OVERRIDE;
+ virtual void ClosePopup() OVERRIDE;
virtual void OnDidBeginEditing() OVERRIDE;
virtual void OnBeforeChange() OVERRIDE;
virtual void OnDidChange() OVERRIDE;
@@ -156,10 +140,7 @@ class OmniboxViewMac : public OmniboxView,
// Pass the current content of |field_| to SetText(), maintaining
// any selection. Named to be consistent with GTK and Windows,
// though here we cannot really do the in-place operation they do.
- void EmphasizeURLComponents();
-
- // Internally invoked whenever the text changes in some way.
- void TextChanged();
+ virtual void EmphasizeURLComponents() OVERRIDE;
// Calculates text attributes according to |display_text| and applies them
// to the given |as| object.
@@ -168,24 +149,14 @@ class OmniboxViewMac : public OmniboxView,
// Return the number of UTF-16 units in the current buffer, excluding the
// suggested text.
+ virtual int GetOmniboxTextLength() const OVERRIDE;
NSUInteger GetTextLength() const;
- // Places the caret at the given position. This clears any selection.
- void PlaceCaretAt(NSUInteger pos);
-
// Returns true if the caret is at the end of the content.
bool IsCaretAtEnd() const;
- scoped_ptr<OmniboxEditModel> model_;
scoped_ptr<OmniboxPopupViewMac> popup_view_;
- OmniboxEditController* controller_;
- ToolbarModel* toolbar_model_;
-
- // The object that handles additional command functionality exposed on the
- // edit, such as invoking the keyword editor.
- CommandUpdater* command_updater_;
-
AutocompleteTextField* field_; // owned by tab controller
// Selection at the point where the user started using the

Powered by Google App Engine
This is Rietveld 408576698