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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm

Issue 491023: Add a keyboard shortcut on Escape that emits the IDC_STOP command.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h"
6 6
7 #include <Carbon/Carbon.h> // kVK_Return 7 #include <Carbon/Carbon.h> // kVK_Return
8 8
9 #include "app/clipboard/clipboard.h" 9 #include "app/clipboard/clipboard.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 model_->OnUpOrDownKeyPressed(model_->result().size()); 593 model_->OnUpOrDownKeyPressed(model_->result().size());
594 return true; 594 return true;
595 } 595 }
596 596
597 if (cmd == @selector(scrollPageUp:)) { 597 if (cmd == @selector(scrollPageUp:)) {
598 model_->OnUpOrDownKeyPressed(-model_->result().size()); 598 model_->OnUpOrDownKeyPressed(-model_->result().size());
599 return true; 599 return true;
600 } 600 }
601 601
602 if (cmd == @selector(cancelOperation:)) { 602 if (cmd == @selector(cancelOperation:)) {
603 model_->OnEscapeKeyPressed(); 603 return model_->OnEscapeKeyPressed();
604 return true;
605 } 604 }
606 605
607 if (cmd == @selector(insertTab:)) { 606 if (cmd == @selector(insertTab:)) {
608 if (model_->is_keyword_hint() && !model_->keyword().empty()) { 607 if (model_->is_keyword_hint() && !model_->keyword().empty()) {
609 model_->AcceptKeyword(); 608 model_->AcceptKeyword();
610 return true; 609 return true;
611 } 610 }
612 } 611 }
613 612
614 // TODO(shess): Option-tab, would normally insert a literal tab 613 // TODO(shess): Option-tab, would normally insert a literal tab
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 clipboard->ReadBookmark(NULL, &url_str); 805 clipboard->ReadBookmark(NULL, &url_str);
807 // pass resulting url string through GURL to normalize 806 // pass resulting url string through GURL to normalize
808 GURL url(url_str); 807 GURL url(url_str);
809 if (url.is_valid()) { 808 if (url.is_valid()) {
810 return UTF8ToWide(url.spec()); 809 return UTF8ToWide(url.spec());
811 } 810 }
812 } 811 }
813 812
814 return std::wstring(); 813 return std::wstring();
815 } 814 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698