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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.h

Issue 2007503002: Views: Replace resource ids with ui::TextEditCommand enum for text editing commands in Textfield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added file deleted during rename. Created 4 years, 7 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/views/omnibox/omnibox_view_views.h
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
index b12098d3e296bf865ad06f843b5990c5e8b9d5e6..232e4bf750c128c2f1f550e10eabca2493e38a93 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -104,6 +104,10 @@ class OmniboxViewViews
void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
void ExecuteCommand(int command_id, int event_flags) override;
+ protected:
+ // views::Textfield:
+ void ExecuteEditCommand(ui::TextEditCommand command) override;
+
private:
FRIEND_TEST_ALL_PREFIXES(OmniboxViewViewsTest, CloseOmniboxPopupOnTextDrag);
@@ -132,6 +136,10 @@ class OmniboxViewViews
// Updates |security_level_| based on the toolbar model's current value.
void UpdateSecurityLevel();
+ // Returns true if the omnibox has specialized behavior for the given
+ // |command|.
+ bool IsEditCommandEnabledInternal(ui::TextEditCommand command) const;
+
// OmniboxView:
void SetWindowTextAndCaretPos(const base::string16& text,
size_t caret_pos,
@@ -179,6 +187,7 @@ class OmniboxViewViews
bool IsCommandIdEnabled(int command_id) const override;
base::string16 GetSelectionClipboardText() const override;
void DoInsertChar(base::char16 ch) override;
+ bool IsEditCommandEnabled(ui::TextEditCommand command) const override;
// chromeos::input_method::InputMethodManager::CandidateWindowObserver:
#if defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698