accessible/src/xpcom/xpcAccessibleTextRange.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set ts=2 et sw=2 tw=80: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     5  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef mozilla_a11y_xpcAccessibleTextRange_h_
     8 #define mozilla_a11y_xpcAccessibleTextRange_h_
    10 #include "nsIAccessibleTextRange.h"
    11 #include "TextRange.h"
    13 #include "mozilla/Move.h"
    14 #include "nsCycleCollectionParticipant.h"
    16 namespace mozilla {
    17 namespace a11y {
    19 class TextRange;
    21 class xpcAccessibleTextRange MOZ_FINAL : public nsIAccessibleTextRange
    22 {
    23 public:
    24   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    25   NS_DECL_CYCLE_COLLECTION_CLASS(xpcAccessibleTextRange)
    27   NS_IMETHOD GetStartContainer(nsIAccessible** aAnchor) MOZ_FINAL MOZ_OVERRIDE;
    28   NS_IMETHOD GetStartOffset(int32_t* aOffset) MOZ_FINAL MOZ_OVERRIDE;
    29   NS_IMETHOD GetEndContainer(nsIAccessible** aAnchor) MOZ_FINAL MOZ_OVERRIDE;
    30   NS_IMETHOD GetEndOffset(int32_t* aOffset) MOZ_FINAL MOZ_OVERRIDE;
    31   NS_IMETHOD GetText(nsAString& aText) MOZ_FINAL MOZ_OVERRIDE;
    33 private:
    34   xpcAccessibleTextRange(TextRange&& aRange) :
    35     mRange(Forward<TextRange>(aRange)) {}
    36   xpcAccessibleTextRange() {}
    37   friend class xpcAccessibleHyperText;
    39   xpcAccessibleTextRange(const xpcAccessibleTextRange&) MOZ_DELETE;
    40   xpcAccessibleTextRange& operator =(const xpcAccessibleTextRange&) MOZ_DELETE;
    42   TextRange mRange;
    43 };
    45 } // namespace a11y
    46 } // namespace mozilla
    48 #endif

mercurial