OLD | NEW |
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 CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ | 5 #ifndef CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ |
6 #define CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ | 6 #define CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/public/renderer/render_view_observer.h" | 10 #include "content/public/renderer/render_view_observer.h" |
| 11 #include "ppapi/features/features.h" |
11 #include "ui/gfx/geometry/point.h" | 12 #include "ui/gfx/geometry/point.h" |
12 #include "ui/gfx/range/range.h" | 13 #include "ui/gfx/range/range.h" |
13 | 14 |
14 namespace blink { | 15 namespace blink { |
15 class WebFrameWidget; | 16 class WebFrameWidget; |
16 class WebLocalFrame; | 17 class WebLocalFrame; |
17 } | 18 } |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 | 21 |
(...skipping 13 matching lines...) Expand all Loading... |
34 | 35 |
35 // IPC::Sender override. | 36 // IPC::Sender override. |
36 bool Send(IPC::Message* message) override; | 37 bool Send(IPC::Message* message) override; |
37 | 38 |
38 private: | 39 private: |
39 // The render widget corresponding to this TextInputClientObserver. | 40 // The render widget corresponding to this TextInputClientObserver. |
40 blink::WebFrameWidget* GetWebFrameWidget() const; | 41 blink::WebFrameWidget* GetWebFrameWidget() const; |
41 | 42 |
42 blink::WebLocalFrame* GetFocusedFrame() const; | 43 blink::WebLocalFrame* GetFocusedFrame() const; |
43 | 44 |
44 #if defined(ENABLE_PLUGINS) | 45 #if BUILDFLAG(ENABLE_PLUGINS) |
45 // Returns the currently focused pepper plugin on the page. The expectation is | 46 // Returns the currently focused pepper plugin on the page. The expectation is |
46 // that the focused pepper plugin is inside a frame whose local root is equal | 47 // that the focused pepper plugin is inside a frame whose local root is equal |
47 // to GetWebFrameWidget()->localRoot(). | 48 // to GetWebFrameWidget()->localRoot(). |
48 PepperPluginInstanceImpl* GetFocusedPepperPlugin() const; | 49 PepperPluginInstanceImpl* GetFocusedPepperPlugin() const; |
49 #endif | 50 #endif |
50 | 51 |
51 // IPC Message handlers: | 52 // IPC Message handlers: |
52 void OnStringAtPoint(gfx::Point point); | 53 void OnStringAtPoint(gfx::Point point); |
53 void OnCharacterIndexForPoint(gfx::Point point); | 54 void OnCharacterIndexForPoint(gfx::Point point); |
54 void OnFirstRectForCharacterRange(gfx::Range range); | 55 void OnFirstRectForCharacterRange(gfx::Range range); |
55 void OnStringForRange(gfx::Range range); | 56 void OnStringForRange(gfx::Range range); |
56 | 57 |
57 // The RenderWidget owning this instance of the observer. | 58 // The RenderWidget owning this instance of the observer. |
58 RenderWidget* render_widget_; | 59 RenderWidget* render_widget_; |
59 | 60 |
60 DISALLOW_COPY_AND_ASSIGN(TextInputClientObserver); | 61 DISALLOW_COPY_AND_ASSIGN(TextInputClientObserver); |
61 }; | 62 }; |
62 | 63 |
63 } // namespace content | 64 } // namespace content |
64 | 65 |
65 #endif // CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ | 66 #endif // CONTENT_RENDERER_TEXT_INPUT_CLIENT_OBSERVER_H_ |
OLD | NEW |