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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 const url::Origin& content_origin, | 465 const url::Origin& content_origin, |
460 const gfx::Size& unobscured_size, | 466 const gfx::Size& unobscured_size, |
461 RecordPeripheralDecision record_decision) const override; | 467 RecordPeripheralDecision record_decision) const override; |
462 void WhitelistContentOrigin(const url::Origin& content_origin) override; | 468 void WhitelistContentOrigin(const url::Origin& content_origin) override; |
463 void PluginDidStartLoading() override; | 469 void PluginDidStartLoading() override; |
464 void PluginDidStopLoading() override; | 470 void PluginDidStopLoading() override; |
465 #endif | 471 #endif |
466 bool IsFTPDirectoryListing() override; | 472 bool IsFTPDirectoryListing() override; |
467 void AttachGuest(int element_instance_id) override; | 473 void AttachGuest(int element_instance_id) override; |
468 void DetachGuest(int element_instance_id) override; | 474 void DetachGuest(int element_instance_id) override; |
469 void SetSelectedText(const base::string16& selection_text, | |
470 size_t offset, | |
471 const gfx::Range& range) override; | |
472 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, | 475 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, |
473 v8::Local<v8::Context> context) override; | 476 v8::Local<v8::Context> context) override; |
474 void AddMessageToConsole(ConsoleMessageLevel level, | 477 void AddMessageToConsole(ConsoleMessageLevel level, |
475 const std::string& message) override; | 478 const std::string& message) override; |
476 void DetachDevToolsForTest() override; | 479 void DetachDevToolsForTest() 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; |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 // c) function:DidFinishDocumentLoadForFrame. When this function is | 1012 // c) function:DidFinishDocumentLoadForFrame. When this function is |
1010 // called, that means we have got whole html page. In here we should | 1013 // called, that means we have got whole html page. In here we should |
1011 // finally get right encoding of page. | 1014 // finally get right encoding of page. |
1012 void UpdateEncoding(blink::WebFrame* frame, | 1015 void UpdateEncoding(blink::WebFrame* frame, |
1013 const std::string& encoding_name); | 1016 const std::string& encoding_name); |
1014 | 1017 |
1015 // Dispatches the current state of selection on the webpage to the browser if | 1018 // Dispatches the current state of selection on the webpage to the browser if |
1016 // it has changed. | 1019 // it has changed. |
1017 // TODO(varunjain): delete this method once we figure out how to keep | 1020 // TODO(varunjain): delete this method once we figure out how to keep |
1018 // selection handles in sync with the webpage. | 1021 // selection handles in sync with the webpage. |
1019 void SyncSelectionIfRequired(); | 1022 void SyncSelectionIfRequired(bool user_initiated); |
1020 | 1023 |
1021 bool RunJavaScriptDialog(JavaScriptDialogType type, | 1024 bool RunJavaScriptDialog(JavaScriptDialogType type, |
1022 const base::string16& message, | 1025 const base::string16& message, |
1023 const base::string16& default_value, | 1026 const base::string16& default_value, |
1024 const GURL& frame_url, | 1027 const GURL& frame_url, |
1025 base::string16* result); | 1028 base::string16* result); |
1026 | 1029 |
1027 // Loads the appropriate error page for the specified failure into the frame. | 1030 // Loads the appropriate error page for the specified failure into the frame. |
1028 // |entry| is only used by PlzNavigate when navigating to a history item. | 1031 // |entry| is only used by PlzNavigate when navigating to a history item. |
1029 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, | 1032 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, |
(...skipping 443 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 |