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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 22 matching lines...) Expand all Loading... |
33 class Sample; | 33 class Sample; |
34 } | 34 } |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 | 37 |
38 class BrowserAccessibilityManager; | 38 class BrowserAccessibilityManager; |
39 class RenderWidgetHostImpl; | 39 class RenderWidgetHostImpl; |
40 class RenderWidgetHostInputEventRouter; | 40 class RenderWidgetHostInputEventRouter; |
41 class RenderViewHostDelegateView; | 41 class RenderViewHostDelegateView; |
42 class TextInputManager; | 42 class TextInputManager; |
| 43 class WebContents; |
43 struct ScreenInfo; | 44 struct ScreenInfo; |
44 struct NativeWebKeyboardEvent; | 45 struct NativeWebKeyboardEvent; |
45 | 46 |
46 // | 47 // |
47 // RenderWidgetHostDelegate | 48 // RenderWidgetHostDelegate |
48 // | 49 // |
49 // An interface implemented by an object interested in knowing about the state | 50 // An interface implemented by an object interested in knowing about the state |
50 // of the RenderWidgetHost. | 51 // of the RenderWidgetHost. |
51 class CONTENT_EXPORT RenderWidgetHostDelegate { | 52 class CONTENT_EXPORT RenderWidgetHostDelegate { |
52 public: | 53 public: |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // Augment a Rappor sample with eTLD+1 context. The caller is still | 243 // Augment a Rappor sample with eTLD+1 context. The caller is still |
243 // responsible for logging the sample to the RapporService. Returns false | 244 // responsible for logging the sample to the RapporService. Returns false |
244 // if the eTLD+1 is not known for |render_widget_host|. | 245 // if the eTLD+1 is not known for |render_widget_host|. |
245 virtual bool AddDomainInfoToRapporSample(rappor::Sample* sample); | 246 virtual bool AddDomainInfoToRapporSample(rappor::Sample* sample); |
246 | 247 |
247 // Notifies the delegate that a focused editable element has been touched | 248 // Notifies the delegate that a focused editable element has been touched |
248 // inside this RenderWidgetHost. If |editable| is true then the focused | 249 // inside this RenderWidgetHost. If |editable| is true then the focused |
249 // element accepts text input. | 250 // element accepts text input. |
250 virtual void FocusedNodeTouched(bool editable) {} | 251 virtual void FocusedNodeTouched(bool editable) {} |
251 | 252 |
| 253 // Return this object cast to a WebContents, if it is one. If the object is |
| 254 // not a WebContents, returns nullptr. |
| 255 virtual WebContents* GetAsWebContents(); |
| 256 |
252 protected: | 257 protected: |
253 virtual ~RenderWidgetHostDelegate() {} | 258 virtual ~RenderWidgetHostDelegate() {} |
254 }; | 259 }; |
255 | 260 |
256 } // namespace content | 261 } // namespace content |
257 | 262 |
258 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 263 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
OLD | NEW |