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

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

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
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 <QuartzCore/QuartzCore.h> 8 #include <QuartzCore/QuartzCore.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 selected_text_.clear(); 1063 selected_text_.clear();
1064 } else { 1064 } else {
1065 size_t pos = range.GetMin() - offset; 1065 size_t pos = range.GetMin() - offset;
1066 size_t n = range.length(); 1066 size_t n = range.length();
1067 1067
1068 DCHECK(pos + n <= text.length()) << "The text can not fully cover range."; 1068 DCHECK(pos + n <= text.length()) << "The text can not fully cover range.";
1069 if (pos >= text.length()) { 1069 if (pos >= text.length()) {
1070 DCHECK(false) << "The text can not cover range."; 1070 DCHECK(false) << "The text can not cover range.";
1071 return; 1071 return;
1072 } 1072 }
1073 selected_text_ = UTF16ToUTF8(text.substr(pos, n)); 1073 selected_text_ = base::UTF16ToUTF8(text.substr(pos, n));
1074 } 1074 }
1075 1075
1076 [cocoa_view_ setSelectedRange:range.ToNSRange()]; 1076 [cocoa_view_ setSelectedRange:range.ToNSRange()];
1077 // Updates markedRange when there is no marked text so that retrieving 1077 // Updates markedRange when there is no marked text so that retrieving
1078 // markedRange immediately after calling setMarkdText: returns the current 1078 // markedRange immediately after calling setMarkdText: returns the current
1079 // caret position. 1079 // caret position.
1080 if (![cocoa_view_ hasMarkedText]) { 1080 if (![cocoa_view_ hasMarkedText]) {
1081 [cocoa_view_ setMarkedRange:range.ToNSRange()]; 1081 [cocoa_view_ setMarkedRange:range.ToNSRange()];
1082 } 1082 }
1083 1083
(...skipping 2899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3983 return YES; 3983 return YES;
3984 } 3984 }
3985 3985
3986 - (BOOL)isOpaque { 3986 - (BOOL)isOpaque {
3987 if (renderWidgetHostView_->use_core_animation_) 3987 if (renderWidgetHostView_->use_core_animation_)
3988 return YES; 3988 return YES;
3989 return [super isOpaque]; 3989 return [super isOpaque];
3990 } 3990 }
3991 3991
3992 @end 3992 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698