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

Side by Side Diff: third_party/WebKit/Source/core/editing/FrameSelection.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 21 matching lines...) Expand all
32 #include "core/editing/EphemeralRange.h" 32 #include "core/editing/EphemeralRange.h"
33 #include "core/editing/VisiblePosition.h" 33 #include "core/editing/VisiblePosition.h"
34 #include "core/editing/VisibleSelection.h" 34 #include "core/editing/VisibleSelection.h"
35 #include "core/editing/iterators/TextIteratorFlags.h" 35 #include "core/editing/iterators/TextIteratorFlags.h"
36 #include "core/layout/ScrollAlignment.h" 36 #include "core/layout/ScrollAlignment.h"
37 #include "platform/Timer.h" 37 #include "platform/Timer.h"
38 #include "platform/geometry/IntRect.h" 38 #include "platform/geometry/IntRect.h"
39 #include "platform/geometry/LayoutRect.h" 39 #include "platform/geometry/LayoutRect.h"
40 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
41 #include "wtf/Noncopyable.h" 41 #include "wtf/Noncopyable.h"
42 #include <memory>
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class CaretBase; 46 class CaretBase;
46 class CharacterData; 47 class CharacterData;
47 class CullRect; 48 class CullRect;
48 class LayoutBlock; 49 class LayoutBlock;
49 class LocalFrame; 50 class LocalFrame;
50 class FrameCaret; 51 class FrameCaret;
51 class GranularityStrategy; 52 class GranularityStrategy;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 VisiblePosition m_originalBase; 295 VisiblePosition m_originalBase;
295 VisiblePositionInFlatTree m_originalBaseInFlatTree; 296 VisiblePositionInFlatTree m_originalBaseInFlatTree;
296 TextGranularity m_granularity; 297 TextGranularity m_granularity;
297 LayoutUnit m_xPosForVerticalArrowNavigation; 298 LayoutUnit m_xPosForVerticalArrowNavigation;
298 299
299 Member<EditingStyle> m_typingStyle; 300 Member<EditingStyle> m_typingStyle;
300 301
301 bool m_focused : 1; 302 bool m_focused : 1;
302 303
303 // Controls text granularity used to adjust the selection's extent in moveRa ngeSelectionExtent. 304 // Controls text granularity used to adjust the selection's extent in moveRa ngeSelectionExtent.
304 OwnPtr<GranularityStrategy> m_granularityStrategy; 305 std::unique_ptr<GranularityStrategy> m_granularityStrategy;
305 306
306 const Member<FrameCaret> m_frameCaret; 307 const Member<FrameCaret> m_frameCaret;
307 }; 308 };
308 309
309 inline EditingStyle* FrameSelection::typingStyle() const 310 inline EditingStyle* FrameSelection::typingStyle() const
310 { 311 {
311 return m_typingStyle.get(); 312 return m_typingStyle.get();
312 } 313 }
313 314
314 inline void FrameSelection::clearTypingStyle() 315 inline void FrameSelection::clearTypingStyle()
315 { 316 {
316 m_typingStyle.clear(); 317 m_typingStyle.clear();
317 } 318 }
318 319
319 inline void FrameSelection::setTypingStyle(EditingStyle* style) 320 inline void FrameSelection::setTypingStyle(EditingStyle* style)
320 { 321 {
321 m_typingStyle = style; 322 m_typingStyle = style;
322 } 323 }
323 } // namespace blink 324 } // namespace blink
324 325
325 #ifndef NDEBUG 326 #ifndef NDEBUG
326 // Outside the WebCore namespace for ease of invocation from gdb. 327 // Outside the WebCore namespace for ease of invocation from gdb.
327 void showTree(const blink::FrameSelection&); 328 void showTree(const blink::FrameSelection&);
328 void showTree(const blink::FrameSelection*); 329 void showTree(const blink::FrameSelection*);
329 #endif 330 #endif
330 331
331 #endif // FrameSelection_h 332 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698