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

Unified Diff: chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h

Issue 10810062: Moving common code into OmniboxView from OmniboxView* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: public destructor 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/gtk/omnibox/omnibox_view_gtk.h
diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
index b73a1e4892e0477c81b74176655fbe53a608c77e..d4ecffc2d27c28e1a9082dba4a3d27d65628d944 100644
--- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
+++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.h
@@ -25,8 +25,6 @@
#include "webkit/glue/window_open_disposition.h"
class Browser;
-class OmniboxEditController;
-class OmniboxEditModel;
class OmniboxPopupView;
class Profile;
@@ -76,22 +74,10 @@ class OmniboxViewGtk : public OmniboxView,
int WidthOfTextAfterCursor();
// 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,
@@ -102,9 +88,7 @@ class OmniboxViewGtk : public OmniboxView,
virtual void GetSelectionBounds(string16::size_type* start,
string16::size_type* end) const OVERRIDE;
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,
@@ -116,7 +100,6 @@ class OmniboxViewGtk : 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& suggestion,
bool animate_to_complete) OVERRIDE;
virtual string16 GetInstantSuggestion() const OVERRIDE;
@@ -234,6 +217,10 @@ class OmniboxViewGtk : public OmniboxView,
void HandleCopyOrCutClipboard(bool copy);
+ // OmniboxView overrides.
Peter Kasting 2012/07/26 23:03:24 Nit: Still seems kind of randomly located. Maybe
dominich 2012/07/27 20:33:54 my thinking was: below callbacks. below static me
Peter Kasting 2012/07/28 00:23:06 Yeah, I'd probably put it above the static method,
+ virtual int GetOmniboxTextLength() const OVERRIDE;
+ virtual void EmphasizeURLComponents() OVERRIDE;
+
// Common implementation for performing a drop on the edit view.
bool OnPerformDropImpl(const string16& text);
@@ -273,21 +260,9 @@ class OmniboxViewGtk : public OmniboxView,
GtkTextIter* iter_min,
GtkTextIter* iter_max);
- // Return the number of characters in the current buffer.
- int GetTextLength() const;
-
- // Places the caret at the given position. This clears any selection.
- void PlaceCaretAt(int pos);
-
// Returns true if the caret is at the end of the content.
bool IsCaretAtEnd() const;
- // Try to parse the current text as a URL and colorize the components.
- void EmphasizeURLComponents();
-
- // Internally invoked whenever the text changes in some way.
- void TextChanged();
-
// Save |selected_text| as the PRIMARY X selection. Unlike
// OwnPrimarySelection(), this won't set an owner or use callbacks.
void SavePrimarySelection(const std::string& selected_text);
@@ -364,14 +339,7 @@ class OmniboxViewGtk : public OmniboxView,
// be used.
GtkTextMark* instant_mark_;
- scoped_ptr<OmniboxEditModel> model_;
scoped_ptr<OmniboxPopupView> 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_;
// When true, the location bar view is read only and also is has a slightly
// different presentation (smaller font size). This is used for popups.

Powered by Google App Engine
This is Rietveld 408576698