Commit 189654fd authored by stkhapugin@chromium.org's avatar stkhapugin@chromium.org Committed by Commit Bot

Remove GetWidth() and GetTextWidth() from OmniboxView.

These methods are only implemented and used by OmniboxViewViews, so
they are removed from the base class.

Bug: 329527
Change-Id: I47bb17b9f51bc623383525181128c7ec5c3e8c40
Reviewed-on: https://chromium-review.googlesource.com/c/1429986
Auto-Submit: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626142}
parent 37b10926
...@@ -96,6 +96,13 @@ class OmniboxViewViews : public OmniboxView, ...@@ -96,6 +96,13 @@ class OmniboxViewViews : public OmniboxView,
bool SelectionAtBeginning() const; bool SelectionAtBeginning() const;
bool SelectionAtEnd() const; bool SelectionAtEnd() const;
// Returns the width in pixels needed to display the current text. The
// returned value includes margins.
int GetTextWidth() const;
// Returns the omnibox's width in pixels.
int GetWidth() const;
// OmniboxView: // OmniboxView:
void EmphasizeURLComponents() override; void EmphasizeURLComponents() override;
void Update() override; void Update() override;
...@@ -114,7 +121,6 @@ class OmniboxViewViews : public OmniboxView, ...@@ -114,7 +121,6 @@ class OmniboxViewViews : public OmniboxView,
void SelectAll(bool reversed) override; void SelectAll(bool reversed) override;
void RevertAll() override; void RevertAll() override;
void SetFocus() override; void SetFocus() override;
int GetTextWidth() const override;
bool IsImeComposing() const override; bool IsImeComposing() const override;
// views::Textfield: // views::Textfield:
...@@ -211,7 +217,6 @@ class OmniboxViewViews : public OmniboxView, ...@@ -211,7 +217,6 @@ class OmniboxViewViews : public OmniboxView,
bool OnAfterPossibleChange(bool allow_keyword_ui_change) override; bool OnAfterPossibleChange(bool allow_keyword_ui_change) override;
gfx::NativeView GetNativeView() const override; gfx::NativeView GetNativeView() const override;
gfx::NativeView GetRelativeWindowForPopup() const override; gfx::NativeView GetRelativeWindowForPopup() const override;
int GetWidth() const override;
bool IsImeShowingPopup() const override; bool IsImeShowingPopup() const override;
void ShowVirtualKeyboardIfEnabled() override; void ShowVirtualKeyboardIfEnabled() override;
void HideImeIfNeeded() override; void HideImeIfNeeded() override;
......
...@@ -194,13 +194,6 @@ class OmniboxView { ...@@ -194,13 +194,6 @@ class OmniboxView {
// the top-most window is the relative window. // the top-most window is the relative window.
virtual gfx::NativeView GetRelativeWindowForPopup() const = 0; virtual gfx::NativeView GetRelativeWindowForPopup() const = 0;
// Returns the width in pixels needed to display the current text. The
// returned value includes margins.
virtual int GetTextWidth() const = 0;
// Returns the omnibox's width in pixels.
virtual int GetWidth() const = 0;
// Returns true if the user is composing something in an IME. // Returns true if the user is composing something in an IME.
virtual bool IsImeComposing() const = 0; virtual bool IsImeComposing() const = 0;
......
...@@ -79,14 +79,6 @@ gfx::NativeView TestOmniboxView::GetRelativeWindowForPopup() const { ...@@ -79,14 +79,6 @@ gfx::NativeView TestOmniboxView::GetRelativeWindowForPopup() const {
return nullptr; return nullptr;
} }
int TestOmniboxView::GetTextWidth() const {
return 0;
}
int TestOmniboxView::GetWidth() const {
return 0;
}
bool TestOmniboxView::IsImeComposing() const { bool TestOmniboxView::IsImeComposing() const {
return false; return false;
} }
......
...@@ -62,8 +62,6 @@ class TestOmniboxView : public OmniboxView { ...@@ -62,8 +62,6 @@ class TestOmniboxView : public OmniboxView {
bool OnAfterPossibleChange(bool allow_keyword_ui_change) override; bool OnAfterPossibleChange(bool allow_keyword_ui_change) override;
gfx::NativeView GetNativeView() const override; gfx::NativeView GetNativeView() const override;
gfx::NativeView GetRelativeWindowForPopup() const override; gfx::NativeView GetRelativeWindowForPopup() const override;
int GetTextWidth() const override;
int GetWidth() const override;
bool IsImeComposing() const override; bool IsImeComposing() const override;
int GetOmniboxTextLength() const override; int GetOmniboxTextLength() const override;
void EmphasizeURLComponents() override {} void EmphasizeURLComponents() override {}
......
...@@ -91,8 +91,6 @@ class OmniboxViewIOS : public OmniboxView, ...@@ -91,8 +91,6 @@ class OmniboxViewIOS : public OmniboxView,
void OnRevertTemporaryText() override {} void OnRevertTemporaryText() override {}
gfx::NativeView GetNativeView() const override; gfx::NativeView GetNativeView() const override;
gfx::NativeView GetRelativeWindowForPopup() const override; gfx::NativeView GetRelativeWindowForPopup() const override;
int GetTextWidth() const override;
int GetWidth() const override;
// AutocompleteTextFieldDelegate methods // AutocompleteTextFieldDelegate methods
void OnDidBeginEditing(); void OnDidBeginEditing();
......
...@@ -392,15 +392,6 @@ gfx::NativeView OmniboxViewIOS::GetRelativeWindowForPopup() const { ...@@ -392,15 +392,6 @@ gfx::NativeView OmniboxViewIOS::GetRelativeWindowForPopup() const {
return nullptr; return nullptr;
} }
int OmniboxViewIOS::GetTextWidth() const {
return 0;
}
// TODO(crbug.com/329527): [Merge r241107] implement OmniboxViewIOS::GetWidth().
int OmniboxViewIOS::GetWidth() const {
return 0;
}
void OmniboxViewIOS::OnDidBeginEditing() { void OmniboxViewIOS::OnDidBeginEditing() {
// Reset the changed flag. // Reset the changed flag.
omnibox_interacted_while_focused_ = NO; omnibox_interacted_while_focused_ = NO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment