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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 RenderWidget* render_widget_to_show, | 318 RenderWidget* render_widget_to_show, |
319 blink::WebNavigationPolicy policy, | 319 blink::WebNavigationPolicy policy, |
320 const gfx::Rect& initial_rect); | 320 const gfx::Rect& initial_rect); |
321 | 321 |
322 // Called when this frame's widget is focused. | 322 // Called when this frame's widget is focused. |
323 void RenderWidgetSetFocus(bool enable); | 323 void RenderWidgetSetFocus(bool enable); |
324 | 324 |
325 // Called when the widget receives a mouse event. | 325 // Called when the widget receives a mouse event. |
326 void RenderWidgetWillHandleMouseEvent(); | 326 void RenderWidgetWillHandleMouseEvent(); |
327 | 327 |
| 328 // Notifies the browser of text selection changes made. |
| 329 void SetSelectedText(const base::string16& selection_text, |
| 330 size_t offset, |
| 331 const gfx::Range& range, |
| 332 bool user_initiated); |
| 333 |
328 #if BUILDFLAG(ENABLE_PLUGINS) | 334 #if BUILDFLAG(ENABLE_PLUGINS) |
329 // Get/set the plugin which will be used to handle document find requests. | 335 // Get/set the plugin which will be used to handle document find requests. |
330 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { | 336 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { |
331 plugin_find_handler_ = plugin; | 337 plugin_find_handler_ = plugin; |
332 } | 338 } |
333 PepperPluginInstanceImpl* plugin_find_handler() { | 339 PepperPluginInstanceImpl* plugin_find_handler() { |
334 return plugin_find_handler_; | 340 return plugin_find_handler_; |
335 } | 341 } |
336 | 342 |
337 // Notification that a PPAPI plugin has been created. | 343 // Notification that a PPAPI plugin has been created. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 const url::Origin& content_origin, | 449 const url::Origin& content_origin, |
444 const gfx::Size& unobscured_size, | 450 const gfx::Size& unobscured_size, |
445 RecordPeripheralDecision record_decision) const override; | 451 RecordPeripheralDecision record_decision) const override; |
446 void WhitelistContentOrigin(const url::Origin& content_origin) override; | 452 void WhitelistContentOrigin(const url::Origin& content_origin) override; |
447 void PluginDidStartLoading() override; | 453 void PluginDidStartLoading() override; |
448 void PluginDidStopLoading() override; | 454 void PluginDidStopLoading() override; |
449 #endif | 455 #endif |
450 bool IsFTPDirectoryListing() override; | 456 bool IsFTPDirectoryListing() override; |
451 void AttachGuest(int element_instance_id) override; | 457 void AttachGuest(int element_instance_id) override; |
452 void DetachGuest(int element_instance_id) override; | 458 void DetachGuest(int element_instance_id) override; |
453 void SetSelectedText(const base::string16& selection_text, | |
454 size_t offset, | |
455 const gfx::Range& range) override; | |
456 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, | 459 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, |
457 v8::Local<v8::Context> context) override; | 460 v8::Local<v8::Context> context) override; |
458 void AddMessageToConsole(ConsoleMessageLevel level, | 461 void AddMessageToConsole(ConsoleMessageLevel level, |
459 const std::string& message) override; | 462 const std::string& message) override; |
460 void DetachDevToolsForTest() override; | 463 void DetachDevToolsForTest() override; |
461 PreviewsState GetPreviewsState() const override; | 464 PreviewsState GetPreviewsState() const override; |
462 bool IsPasting() const override; | 465 bool IsPasting() const override; |
463 blink::WebPageVisibilityState GetVisibilityState() const override; | 466 blink::WebPageVisibilityState GetVisibilityState() const override; |
464 bool IsBrowserSideNavigationPending() override; | 467 bool IsBrowserSideNavigationPending() override; |
465 base::SingleThreadTaskRunner* GetTimerTaskRunner() override; | 468 base::SingleThreadTaskRunner* GetTimerTaskRunner() override; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 const RendererPreferences& GetRendererPreferences() const; | 759 const RendererPreferences& GetRendererPreferences() const; |
757 | 760 |
758 #if defined(OS_MACOSX) | 761 #if defined(OS_MACOSX) |
759 void OnCopyToFindPboard(); | 762 void OnCopyToFindPboard(); |
760 #endif | 763 #endif |
761 | 764 |
762 // Dispatches the current state of selection on the webpage to the browser if | 765 // Dispatches the current state of selection on the webpage to the browser if |
763 // it has changed. | 766 // it has changed. |
764 // TODO(varunjain): delete this method once we figure out how to keep | 767 // TODO(varunjain): delete this method once we figure out how to keep |
765 // selection handles in sync with the webpage. | 768 // selection handles in sync with the webpage. |
766 void SyncSelectionIfRequired(); | 769 void SyncSelectionIfRequired(bool user_initiated); |
767 | 770 |
768 protected: | 771 protected: |
769 explicit RenderFrameImpl(const CreateParams& params); | 772 explicit RenderFrameImpl(const CreateParams& params); |
770 | 773 |
771 private: | 774 private: |
772 friend class RenderFrameImplTest; | 775 friend class RenderFrameImplTest; |
773 friend class RenderFrameObserver; | 776 friend class RenderFrameObserver; |
774 friend class RenderAccessibilityImplTest; | 777 friend class RenderAccessibilityImplTest; |
775 friend class TestRenderFrame; | 778 friend class TestRenderFrame; |
776 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); | 779 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1419 std::vector<media::RoutingTokenCallback> pending_routing_token_callbacks_; | 1422 std::vector<media::RoutingTokenCallback> pending_routing_token_callbacks_; |
1420 | 1423 |
1421 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1424 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
1422 | 1425 |
1423 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1426 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
1424 }; | 1427 }; |
1425 | 1428 |
1426 } // namespace content | 1429 } // namespace content |
1427 | 1430 |
1428 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1431 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |