| 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> |
| 11 | 11 |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "components/ukm/public/ukm_recorder.h" |
| 13 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 14 #include "content/common/drag_event_source_info.h" | 15 #include "content/common/drag_event_source_info.h" |
| 15 #include "content/public/common/drop_data.h" | 16 #include "content/public/common/drop_data.h" |
| 16 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 17 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
| 17 #include "third_party/WebKit/public/platform/WebDragOperation.h" | 18 #include "third_party/WebKit/public/platform/WebDragOperation.h" |
| 18 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 19 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 20 #include "ui/gfx/native_widget_types.h" |
| 20 | 21 |
| 21 namespace blink { | 22 namespace blink { |
| 22 class WebMouseWheelEvent; | 23 class WebMouseWheelEvent; |
| 23 class WebGestureEvent; | 24 class WebGestureEvent; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace gfx { | 27 namespace gfx { |
| 27 class Point; | 28 class Point; |
| 28 class Size; | 29 class Size; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace rappor { | 32 namespace rappor { |
| 32 class Sample; | 33 class Sample; |
| 33 } | 34 } |
| 34 | 35 |
| 36 namespace ukm { |
| 37 class UkmRecorder; |
| 38 } |
| 39 |
| 35 namespace content { | 40 namespace content { |
| 36 | 41 |
| 37 class BrowserAccessibilityManager; | 42 class BrowserAccessibilityManager; |
| 38 class RenderWidgetHostImpl; | 43 class RenderWidgetHostImpl; |
| 39 class RenderWidgetHostInputEventRouter; | 44 class RenderWidgetHostInputEventRouter; |
| 40 class RenderViewHostDelegateView; | 45 class RenderViewHostDelegateView; |
| 41 class TextInputManager; | 46 class TextInputManager; |
| 42 class WebContents; | 47 class WebContents; |
| 43 enum class KeyboardEventProcessingResult; | 48 enum class KeyboardEventProcessingResult; |
| 44 struct ScreenInfo; | 49 struct ScreenInfo; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // |render_widget_host| is focused and that its owning WebContents is also | 242 // |render_widget_host| is focused and that its owning WebContents is also |
| 238 // the focused WebContents. | 243 // the focused WebContents. |
| 239 virtual void FocusOwningWebContents( | 244 virtual void FocusOwningWebContents( |
| 240 RenderWidgetHostImpl* render_widget_host) {} | 245 RenderWidgetHostImpl* render_widget_host) {} |
| 241 | 246 |
| 242 // Augment a Rappor sample with eTLD+1 context. The caller is still | 247 // Augment a Rappor sample with eTLD+1 context. The caller is still |
| 243 // responsible for logging the sample to the RapporService. Returns false | 248 // responsible for logging the sample to the RapporService. Returns false |
| 244 // if the eTLD+1 is not known for |render_widget_host|. | 249 // if the eTLD+1 is not known for |render_widget_host|. |
| 245 virtual bool AddDomainInfoToRapporSample(rappor::Sample* sample); | 250 virtual bool AddDomainInfoToRapporSample(rappor::Sample* sample); |
| 246 | 251 |
| 252 // Update UkmRecorder for the given source with the URL. This is used for |
| 253 // URL-keyed metrics to set the url for a report. |
| 254 virtual void UpdateUrlForUkmSource(ukm::UkmRecorder* service, |
| 255 ukm::SourceId ukm_source_id); |
| 256 |
| 247 // Notifies the delegate that a focused editable element has been touched | 257 // Notifies the delegate that a focused editable element has been touched |
| 248 // inside this RenderWidgetHost. If |editable| is true then the focused | 258 // inside this RenderWidgetHost. If |editable| is true then the focused |
| 249 // element accepts text input. | 259 // element accepts text input. |
| 250 virtual void FocusedNodeTouched(bool editable) {} | 260 virtual void FocusedNodeTouched(bool editable) {} |
| 251 | 261 |
| 252 // Return this object cast to a WebContents, if it is one. If the object is | 262 // Return this object cast to a WebContents, if it is one. If the object is |
| 253 // not a WebContents, returns nullptr. | 263 // not a WebContents, returns nullptr. |
| 254 virtual WebContents* GetAsWebContents(); | 264 virtual WebContents* GetAsWebContents(); |
| 255 | 265 |
| 256 // Notifies that a CompositorFrame was received from the renderer. | 266 // Notifies that a CompositorFrame was received from the renderer. |
| 257 virtual void DidReceiveCompositorFrame() {} | 267 virtual void DidReceiveCompositorFrame() {} |
| 258 | 268 |
| 259 protected: | 269 protected: |
| 260 virtual ~RenderWidgetHostDelegate() {} | 270 virtual ~RenderWidgetHostDelegate() {} |
| 261 }; | 271 }; |
| 262 | 272 |
| 263 } // namespace content | 273 } // namespace content |
| 264 | 274 |
| 265 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ | 275 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ |
| OLD | NEW |