OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_RENDERER_RENDER_VIEW_SELECTION_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_SELECTION_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_SELECTION_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_SELECTION_H_ |
7 #pragma once | |
8 | 7 |
9 #include <string> | 8 #include <string> |
10 #include "ui/base/range/range.h" | 9 #include "ui/base/range/range.h" |
11 #include "ui/gfx/point.h" | 10 #include "ui/gfx/point.h" |
12 | 11 |
13 // Please do not use this class. This is to be deleted. | 12 // Please do not use this class. This is to be deleted. |
14 // A data class to represent selection on a webpage. | 13 // A data class to represent selection on a webpage. |
15 // TODO(varunjain): delete this class. | 14 // TODO(varunjain): delete this class. |
16 class RenderViewSelection { | 15 class RenderViewSelection { |
17 public: | 16 public: |
18 RenderViewSelection(); | 17 RenderViewSelection(); |
19 RenderViewSelection(const std::string& text, | 18 RenderViewSelection(const std::string& text, |
20 const ui::Range range, | 19 const ui::Range range, |
21 const gfx::Point start, | 20 const gfx::Point start, |
22 const gfx::Point end); | 21 const gfx::Point end); |
23 | 22 |
24 virtual ~RenderViewSelection(); | 23 virtual ~RenderViewSelection(); |
25 | 24 |
26 bool Equals(const RenderViewSelection& that) const; | 25 bool Equals(const RenderViewSelection& that) const; |
27 | 26 |
28 private: | 27 private: |
29 std::string text_; | 28 std::string text_; |
30 ui::Range range_; | 29 ui::Range range_; |
31 gfx::Point start_; | 30 gfx::Point start_; |
32 gfx::Point end_; | 31 gfx::Point end_; |
33 }; | 32 }; |
34 | 33 |
35 #endif // CONTENT_RENDERER_RENDER_VIEW_SELECTION_H_ | 34 #endif // CONTENT_RENDERER_RENDER_VIEW_SELECTION_H_ |
OLD | NEW |