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

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

Issue 10704074: "Paste and go" state was being calculated wrong on views (at least). Fix by making this calculatio… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
===================================================================
--- chrome/browser/ui/views/omnibox/omnibox_view_views.cc (revision 144499)
+++ chrome/browser/ui/views/omnibox/omnibox_view_views.cc (working copy)
@@ -863,15 +863,14 @@
}
bool OmniboxViewViews::IsCommandIdEnabled(int command_id) const {
- if (command_id == IDS_PASTE_AND_GO)
- return !popup_window_mode_ && model_->CanPasteAndGo(GetClipboardText());
-
- return command_updater_->IsCommandEnabled(command_id);
+ return (command_id == IDS_PASTE_AND_GO) ?
+ model_->CanPasteAndGo(GetClipboardText()) :
+ command_updater_->IsCommandEnabled(command_id);
}
void OmniboxViewViews::ExecuteCommand(int command_id) {
if (command_id == IDS_PASTE_AND_GO) {
- model_->PasteAndGo();
+ model_->PasteAndGo(GetClipboardText());
return;
}
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698