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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/cocoa/omnibox/omnibox_view_mac.h" 5 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
6 6
7 #include <Carbon/Carbon.h> // kVK_Return 7 #include <Carbon/Carbon.h> // kVK_Return
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 // Opening a URL in a background tab should also revert the omnibox contents 872 // Opening a URL in a background tab should also revert the omnibox contents
873 // to their original state. We cannot do a blanket revert in OpenURL() 873 // to their original state. We cannot do a blanket revert in OpenURL()
874 // because middle-clicks also open in a new background tab, but those should 874 // because middle-clicks also open in a new background tab, but those should
875 // not revert the omnibox text. 875 // not revert the omnibox text.
876 RevertAll(); 876 RevertAll();
877 return true; 877 return true;
878 } 878 }
879 879
880 // Option-Return 880 // Option-Return
881 if (cmd == @selector(insertNewlineIgnoringFieldEditor:)) { 881 if (cmd == @selector(insertNewlineIgnoringFieldEditor:)) {
882 model()->AcceptInput(NEW_FOREGROUND_TAB, false); 882 model()->AcceptInput(WindowOpenDisposition::NEW_FOREGROUND_TAB, false);
883 return true; 883 return true;
884 } 884 }
885 885
886 // When the user does Control-Enter, the existing content has "www." 886 // When the user does Control-Enter, the existing content has "www."
887 // prepended and ".com" appended. model() should already have 887 // prepended and ".com" appended. model() should already have
888 // received notification when the Control key was depressed, but it 888 // received notification when the Control key was depressed, but it
889 // is safe to tell it twice. 889 // is safe to tell it twice.
890 if (cmd == @selector(insertLineBreak:)) { 890 if (cmd == @selector(insertLineBreak:)) {
891 OnControlKeyChanged(true); 891 OnControlKeyChanged(true);
892 WindowOpenDisposition disposition = 892 WindowOpenDisposition disposition =
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 display_text); 1139 display_text);
1140 NSDictionary* notification_info = @{ 1140 NSDictionary* notification_info = @{
1141 NSAccessibilityAnnouncementKey : announcement, 1141 NSAccessibilityAnnouncementKey : announcement,
1142 NSAccessibilityPriorityKey : @(NSAccessibilityPriorityHigh) 1142 NSAccessibilityPriorityKey : @(NSAccessibilityPriorityHigh)
1143 }; 1143 };
1144 NSAccessibilityPostNotificationWithUserInfo( 1144 NSAccessibilityPostNotificationWithUserInfo(
1145 [field_ window], 1145 [field_ window],
1146 NSAccessibilityAnnouncementRequestedNotification, 1146 NSAccessibilityAnnouncementRequestedNotification,
1147 notification_info); 1147 notification_info);
1148 } 1148 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm ('k') | chrome/browser/ui/cocoa/one_click_signin_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698