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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 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 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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
(...skipping 2973 matching lines...) Expand 10 before | Expand all | Expand 10 after
2984 CommandNameForSelector(selector) UTF8String]); 2984 CommandNameForSelector(selector) UTF8String]);
2985 2985
2986 // If this method is called when handling a key down event, then we need to 2986 // If this method is called when handling a key down event, then we need to
2987 // handle the command in the key event handler. Otherwise we can just handle 2987 // handle the command in the key event handler. Otherwise we can just handle
2988 // it here. 2988 // it here.
2989 if (handlingKeyDown_) { 2989 if (handlingKeyDown_) {
2990 hasEditCommands_ = YES; 2990 hasEditCommands_ = YES;
2991 // We ignore commands that insert characters, because this was causing 2991 // We ignore commands that insert characters, because this was causing
2992 // strange behavior (e.g. tab always inserted a tab rather than moving to 2992 // strange behavior (e.g. tab always inserted a tab rather than moving to
2993 // the next field on the page). 2993 // the next field on the page).
2994 if (!base::StartsWithASCII(command, "insert", false)) 2994 if (!base::StartsWith(command, "insert",
2995 base::CompareCase::INSENSITIVE_ASCII))
2995 editCommands_.push_back(EditCommand(command, "")); 2996 editCommands_.push_back(EditCommand(command, ""));
2996 } else { 2997 } else {
2997 RenderWidgetHostImpl* rwh = renderWidgetHostView_->render_widget_host_; 2998 RenderWidgetHostImpl* rwh = renderWidgetHostView_->render_widget_host_;
2998 rwh->Send(new InputMsg_ExecuteEditCommand(rwh->GetRoutingID(), 2999 rwh->Send(new InputMsg_ExecuteEditCommand(rwh->GetRoutingID(),
2999 command, "")); 3000 command, ""));
3000 } 3001 }
3001 } 3002 }
3002 3003
3003 - (void)insertText:(id)string replacementRange:(NSRange)replacementRange { 3004 - (void)insertText:(id)string replacementRange:(NSRange)replacementRange {
3004 // An input method has characters to be inserted. 3005 // An input method has characters to be inserted.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
3304 3305
3305 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3306 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3306 // regions that are not draggable. (See ControlRegionView in 3307 // regions that are not draggable. (See ControlRegionView in
3307 // native_app_window_cocoa.mm). This requires the render host view to be 3308 // native_app_window_cocoa.mm). This requires the render host view to be
3308 // draggable by default. 3309 // draggable by default.
3309 - (BOOL)mouseDownCanMoveWindow { 3310 - (BOOL)mouseDownCanMoveWindow {
3310 return YES; 3311 return YES;
3311 } 3312 }
3312 3313
3313 @end 3314 @end
OLDNEW
« no previous file with comments | « content/browser/media/capture/web_contents_capture_util.cc ('k') | content/browser/service_worker/service_worker_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698