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

Side by Side Diff: ui/base/range/range.h

Issue 10332205: Fix logging of string16s from gfx namespace on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | ui/base/range/range.cc » ('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) 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 #ifndef UI_BASE_RANGE_RANGE_H_ 5 #ifndef UI_BASE_RANGE_RANGE_H_
6 #define UI_BASE_RANGE_RANGE_H_ 6 #define UI_BASE_RANGE_RANGE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <iosfwd> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "ui/base/ui_export.h" 12 #include "ui/base/ui_export.h"
13 13
14 #if defined(OS_MACOSX) 14 #if defined(OS_MACOSX)
15 #if __OBJC__ 15 #if __OBJC__
16 #import <Foundation/Foundation.h> 16 #import <Foundation/Foundation.h>
17 #else 17 #else
18 typedef struct _NSRange NSRange; 18 typedef struct _NSRange NSRange;
19 #endif 19 #endif
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 Range& operator=(const NSRange& range); 96 Range& operator=(const NSRange& range);
97 97
98 // NSRange does not store the directionality of a range, so if this 98 // NSRange does not store the directionality of a range, so if this
99 // is_reversed(), the range will get flipped when converted to an NSRange. 99 // is_reversed(), the range will get flipped when converted to an NSRange.
100 NSRange ToNSRange() const; 100 NSRange ToNSRange() const;
101 #elif defined(OS_WIN) 101 #elif defined(OS_WIN)
102 CHARRANGE ToCHARRANGE() const; 102 CHARRANGE ToCHARRANGE() const;
103 #endif 103 #endif
104 // GTK+ has no concept of a range. 104 // GTK+ has no concept of a range.
105 105
106 std::string ToString() const;
107
106 private: 108 private:
107 size_t start_; 109 size_t start_;
108 size_t end_; 110 size_t end_;
109 }; 111 };
110 112
111 UI_EXPORT std::ostream& operator<<(std::ostream& out, const ui::Range& range); 113 } // namespace ui
112
113 } // namespace gfx
114 114
115 #endif // UI_BASE_RANGE_RANGE_H_ 115 #endif // UI_BASE_RANGE_RANGE_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/range/range.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698