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

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

Issue 1309413006: Move VisibleSelection::ChangeObserver out from VisibleSelection class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-04T15:50:42 Created 5 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
« no previous file with comments | « no previous file | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class HTMLFormElement; 49 class HTMLFormElement;
50 class Text; 50 class Text;
51 51
52 enum EUserTriggered { NotUserTriggered = 0, UserTriggered = 1 }; 52 enum EUserTriggered { NotUserTriggered = 0, UserTriggered = 1 };
53 53
54 enum RevealExtentOption { 54 enum RevealExtentOption {
55 RevealExtent, 55 RevealExtent,
56 DoNotRevealExtent 56 DoNotRevealExtent
57 }; 57 };
58 58
59 class CORE_EXPORT FrameSelection final : public NoBaseWillBeGarbageCollectedFina lized<FrameSelection>, public VisibleSelection::ChangeObserver, private CaretBas e { 59 class CORE_EXPORT FrameSelection final : public NoBaseWillBeGarbageCollectedFina lized<FrameSelection>, public VisibleSelectionChangeObserver, private CaretBase {
60 WTF_MAKE_NONCOPYABLE(FrameSelection); 60 WTF_MAKE_NONCOPYABLE(FrameSelection);
61 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(FrameSelection); 61 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(FrameSelection);
62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameSelection); 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameSelection);
63 public: 63 public:
64 static PassOwnPtrWillBeRawPtr<FrameSelection> create(LocalFrame* frame = nul lptr) 64 static PassOwnPtrWillBeRawPtr<FrameSelection> create(LocalFrame* frame = nul lptr)
65 { 65 {
66 return adoptPtrWillBeNoop(new FrameSelection(frame)); 66 return adoptPtrWillBeNoop(new FrameSelection(frame));
67 } 67 }
68 virtual ~FrameSelection(); 68 virtual ~FrameSelection();
69 69
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 LayoutRect unclippedBounds() const; 221 LayoutRect unclippedBounds() const;
222 222
223 HTMLFormElement* currentForm() const; 223 HTMLFormElement* currentForm() const;
224 224
225 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf Needed, RevealExtentOption = DoNotRevealExtent); 225 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf Needed, RevealExtentOption = DoNotRevealExtent);
226 void setSelectionFromNone(); 226 void setSelectionFromNone();
227 227
228 bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; } 228 bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; }
229 void setShouldShowBlockCursor(bool); 229 void setShouldShowBlockCursor(bool);
230 230
231 // VisibleSelection::ChangeObserver interface. 231 // VisibleSelectionChangeObserver interface.
232 void didChangeVisibleSelection() override; 232 void didChangeVisibleSelection() override;
233 233
234 DECLARE_VIRTUAL_TRACE(); 234 DECLARE_VIRTUAL_TRACE();
235 235
236 private: 236 private:
237 explicit FrameSelection(LocalFrame*); 237 explicit FrameSelection(LocalFrame*);
238 238
239 // TODO(yosin) We should use capitalized name for |EPositionType|. 239 // TODO(yosin) We should use capitalized name for |EPositionType|.
240 enum EPositionType { START, END, BASE, EXTENT }; // NOLINT 240 enum EPositionType { START, END, BASE, EXTENT }; // NOLINT
241 241
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 } // namespace blink 338 } // namespace blink
339 339
340 #ifndef NDEBUG 340 #ifndef NDEBUG
341 // Outside the WebCore namespace for ease of invocation from gdb. 341 // Outside the WebCore namespace for ease of invocation from gdb.
342 void showTree(const blink::FrameSelection&); 342 void showTree(const blink::FrameSelection&);
343 void showTree(const blink::FrameSelection*); 343 void showTree(const blink::FrameSelection*);
344 #endif 344 #endif
345 345
346 #endif // FrameSelection_h 346 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698