OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 RenderWidget* render_widget_to_show, | 335 RenderWidget* render_widget_to_show, |
336 blink::WebNavigationPolicy policy, | 336 blink::WebNavigationPolicy policy, |
337 const gfx::Rect& initial_rect); | 337 const gfx::Rect& initial_rect); |
338 | 338 |
339 // Called when this frame's widget is focused. | 339 // Called when this frame's widget is focused. |
340 void RenderWidgetSetFocus(bool enable); | 340 void RenderWidgetSetFocus(bool enable); |
341 | 341 |
342 // Called when the widget receives a mouse event. | 342 // Called when the widget receives a mouse event. |
343 void RenderWidgetWillHandleMouseEvent(); | 343 void RenderWidgetWillHandleMouseEvent(); |
344 | 344 |
| 345 // Notifies the browser of text selection changes made. |
| 346 void SetSelectedText(const base::string16& selection_text, |
| 347 size_t offset, |
| 348 const gfx::Range& range, |
| 349 bool user_initiated); |
| 350 |
345 #if BUILDFLAG(ENABLE_PLUGINS) | 351 #if BUILDFLAG(ENABLE_PLUGINS) |
346 // Get/set the plugin which will be used to handle document find requests. | 352 // Get/set the plugin which will be used to handle document find requests. |
347 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { | 353 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { |
348 plugin_find_handler_ = plugin; | 354 plugin_find_handler_ = plugin; |
349 } | 355 } |
350 PepperPluginInstanceImpl* plugin_find_handler() { | 356 PepperPluginInstanceImpl* plugin_find_handler() { |
351 return plugin_find_handler_; | 357 return plugin_find_handler_; |
352 } | 358 } |
353 | 359 |
354 // Notification that a PPAPI plugin has been created. | 360 // Notification that a PPAPI plugin has been created. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 const url::Origin& content_origin, | 466 const url::Origin& content_origin, |
461 const gfx::Size& unobscured_size, | 467 const gfx::Size& unobscured_size, |
462 RecordPeripheralDecision record_decision) const override; | 468 RecordPeripheralDecision record_decision) const override; |
463 void WhitelistContentOrigin(const url::Origin& content_origin) override; | 469 void WhitelistContentOrigin(const url::Origin& content_origin) override; |
464 void PluginDidStartLoading() override; | 470 void PluginDidStartLoading() override; |
465 void PluginDidStopLoading() override; | 471 void PluginDidStopLoading() override; |
466 #endif | 472 #endif |
467 bool IsFTPDirectoryListing() override; | 473 bool IsFTPDirectoryListing() override; |
468 void AttachGuest(int element_instance_id) override; | 474 void AttachGuest(int element_instance_id) override; |
469 void DetachGuest(int element_instance_id) override; | 475 void DetachGuest(int element_instance_id) override; |
470 void SetSelectedText(const base::string16& selection_text, | |
471 size_t offset, | |
472 const gfx::Range& range) override; | |
473 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, | 476 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, |
474 v8::Local<v8::Context> context) override; | 477 v8::Local<v8::Context> context) override; |
475 void AddMessageToConsole(ConsoleMessageLevel level, | 478 void AddMessageToConsole(ConsoleMessageLevel level, |
476 const std::string& message) override; | 479 const std::string& message) override; |
477 PreviewsState GetPreviewsState() const override; | 480 PreviewsState GetPreviewsState() const override; |
478 bool IsPasting() const override; | 481 bool IsPasting() const override; |
479 blink::WebPageVisibilityState GetVisibilityState() const override; | 482 blink::WebPageVisibilityState GetVisibilityState() const override; |
480 bool IsBrowserSideNavigationPending() override; | 483 bool IsBrowserSideNavigationPending() override; |
481 base::SingleThreadTaskRunner* GetTimerTaskRunner() override; | 484 base::SingleThreadTaskRunner* GetTimerTaskRunner() override; |
482 base::SingleThreadTaskRunner* GetLoadingTaskRunner() override; | 485 base::SingleThreadTaskRunner* GetLoadingTaskRunner() override; |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 // c) function:DidFinishDocumentLoadForFrame. When this function is | 1016 // c) function:DidFinishDocumentLoadForFrame. When this function is |
1014 // called, that means we have got whole html page. In here we should | 1017 // called, that means we have got whole html page. In here we should |
1015 // finally get right encoding of page. | 1018 // finally get right encoding of page. |
1016 void UpdateEncoding(blink::WebFrame* frame, | 1019 void UpdateEncoding(blink::WebFrame* frame, |
1017 const std::string& encoding_name); | 1020 const std::string& encoding_name); |
1018 | 1021 |
1019 // Dispatches the current state of selection on the webpage to the browser if | 1022 // Dispatches the current state of selection on the webpage to the browser if |
1020 // it has changed. | 1023 // it has changed. |
1021 // TODO(varunjain): delete this method once we figure out how to keep | 1024 // TODO(varunjain): delete this method once we figure out how to keep |
1022 // selection handles in sync with the webpage. | 1025 // selection handles in sync with the webpage. |
1023 void SyncSelectionIfRequired(); | 1026 void SyncSelectionIfRequired(bool user_initiated); |
1024 | 1027 |
1025 bool RunJavaScriptDialog(JavaScriptDialogType type, | 1028 bool RunJavaScriptDialog(JavaScriptDialogType type, |
1026 const base::string16& message, | 1029 const base::string16& message, |
1027 const base::string16& default_value, | 1030 const base::string16& default_value, |
1028 const GURL& frame_url, | 1031 const GURL& frame_url, |
1029 base::string16* result); | 1032 base::string16* result); |
1030 | 1033 |
1031 // Loads the appropriate error page for the specified failure into the frame. | 1034 // Loads the appropriate error page for the specified failure into the frame. |
1032 // |entry| is only used by PlzNavigate when navigating to a history item. | 1035 // |entry| is only used by PlzNavigate when navigating to a history item. |
1033 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, | 1036 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 std::vector<media::RoutingTokenCallback> pending_routing_token_callbacks_; | 1476 std::vector<media::RoutingTokenCallback> pending_routing_token_callbacks_; |
1474 | 1477 |
1475 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1478 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1476 | 1479 |
1477 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1480 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1478 }; | 1481 }; |
1479 | 1482 |
1480 } // namespace content | 1483 } // namespace content |
1481 | 1484 |
1482 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1485 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |