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 | |
351 #if BUILDFLAG(ENABLE_PLUGINS) | 345 #if BUILDFLAG(ENABLE_PLUGINS) |
352 // Get/set the plugin which will be used to handle document find requests. | 346 // Get/set the plugin which will be used to handle document find requests. |
353 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { | 347 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { |
354 plugin_find_handler_ = plugin; | 348 plugin_find_handler_ = plugin; |
355 } | 349 } |
356 PepperPluginInstanceImpl* plugin_find_handler() { | 350 PepperPluginInstanceImpl* plugin_find_handler() { |
357 return plugin_find_handler_; | 351 return plugin_find_handler_; |
358 } | 352 } |
359 | 353 |
360 // Notification that a PPAPI plugin has been created. | 354 // Notification that a PPAPI plugin has been created. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 const url::Origin& content_origin, | 459 const url::Origin& content_origin, |
466 const gfx::Size& unobscured_size, | 460 const gfx::Size& unobscured_size, |
467 RecordPeripheralDecision record_decision) const override; | 461 RecordPeripheralDecision record_decision) const override; |
468 void WhitelistContentOrigin(const url::Origin& content_origin) override; | 462 void WhitelistContentOrigin(const url::Origin& content_origin) override; |
469 void PluginDidStartLoading() override; | 463 void PluginDidStartLoading() override; |
470 void PluginDidStopLoading() override; | 464 void PluginDidStopLoading() override; |
471 #endif | 465 #endif |
472 bool IsFTPDirectoryListing() override; | 466 bool IsFTPDirectoryListing() override; |
473 void AttachGuest(int element_instance_id) override; | 467 void AttachGuest(int element_instance_id) override; |
474 void DetachGuest(int element_instance_id) override; | 468 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; |
475 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, | 472 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, |
476 v8::Local<v8::Context> context) override; | 473 v8::Local<v8::Context> context) override; |
477 void AddMessageToConsole(ConsoleMessageLevel level, | 474 void AddMessageToConsole(ConsoleMessageLevel level, |
478 const std::string& message) override; | 475 const std::string& message) override; |
479 void DetachDevToolsForTest() override; | 476 void DetachDevToolsForTest() override; |
480 PreviewsState GetPreviewsState() const override; | 477 PreviewsState GetPreviewsState() const override; |
481 bool IsPasting() const override; | 478 bool IsPasting() const override; |
482 blink::WebPageVisibilityState GetVisibilityState() const override; | 479 blink::WebPageVisibilityState GetVisibilityState() const override; |
483 bool IsBrowserSideNavigationPending() override; | 480 bool IsBrowserSideNavigationPending() override; |
484 base::SingleThreadTaskRunner* GetTimerTaskRunner() override; | 481 base::SingleThreadTaskRunner* GetTimerTaskRunner() override; |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 // c) function:DidFinishDocumentLoadForFrame. When this function is | 1009 // c) function:DidFinishDocumentLoadForFrame. When this function is |
1013 // called, that means we have got whole html page. In here we should | 1010 // called, that means we have got whole html page. In here we should |
1014 // finally get right encoding of page. | 1011 // finally get right encoding of page. |
1015 void UpdateEncoding(blink::WebFrame* frame, | 1012 void UpdateEncoding(blink::WebFrame* frame, |
1016 const std::string& encoding_name); | 1013 const std::string& encoding_name); |
1017 | 1014 |
1018 // Dispatches the current state of selection on the webpage to the browser if | 1015 // Dispatches the current state of selection on the webpage to the browser if |
1019 // it has changed. | 1016 // it has changed. |
1020 // TODO(varunjain): delete this method once we figure out how to keep | 1017 // TODO(varunjain): delete this method once we figure out how to keep |
1021 // selection handles in sync with the webpage. | 1018 // selection handles in sync with the webpage. |
1022 void SyncSelectionIfRequired(bool user_initiated); | 1019 void SyncSelectionIfRequired(); |
1023 | 1020 |
1024 bool RunJavaScriptDialog(JavaScriptDialogType type, | 1021 bool RunJavaScriptDialog(JavaScriptDialogType type, |
1025 const base::string16& message, | 1022 const base::string16& message, |
1026 const base::string16& default_value, | 1023 const base::string16& default_value, |
1027 const GURL& frame_url, | 1024 const GURL& frame_url, |
1028 base::string16* result); | 1025 base::string16* result); |
1029 | 1026 |
1030 // Loads the appropriate error page for the specified failure into the frame. | 1027 // Loads the appropriate error page for the specified failure into the frame. |
1031 // |entry| is only used by PlzNavigate when navigating to a history item. | 1028 // |entry| is only used by PlzNavigate when navigating to a history item. |
1032 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, | 1029 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1476 std::vector<media::RoutingTokenCallback> pending_routing_token_callbacks_; | 1473 std::vector<media::RoutingTokenCallback> pending_routing_token_callbacks_; |
1477 | 1474 |
1478 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1475 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1479 | 1476 |
1480 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1477 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1481 }; | 1478 }; |
1482 | 1479 |
1483 } // namespace content | 1480 } // namespace content |
1484 | 1481 |
1485 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1482 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |