| 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_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 class WebHitTestResult; | 116 class WebHitTestResult; |
| 117 #endif | 117 #endif |
| 118 } // namespace blink | 118 } // namespace blink |
| 119 | 119 |
| 120 namespace content { | 120 namespace content { |
| 121 | 121 |
| 122 class HistoryController; | 122 class HistoryController; |
| 123 class HistoryEntry; | 123 class HistoryEntry; |
| 124 class MouseLockDispatcher; | 124 class MouseLockDispatcher; |
| 125 class PageState; | 125 class PageState; |
| 126 class PepperPluginInstanceImpl; | |
| 127 class RenderViewImplTest; | 126 class RenderViewImplTest; |
| 128 class RenderViewObserver; | 127 class RenderViewObserver; |
| 129 class RenderViewTest; | 128 class RenderViewTest; |
| 130 class RendererDateTimePicker; | 129 class RendererDateTimePicker; |
| 131 class RendererWebColorChooserImpl; | 130 class RendererWebColorChooserImpl; |
| 132 class SpeechRecognitionDispatcher; | 131 class SpeechRecognitionDispatcher; |
| 133 class WebPluginDelegateProxy; | 132 class WebPluginDelegateProxy; |
| 134 struct DropData; | 133 struct DropData; |
| 135 struct FaviconURL; | 134 struct FaviconURL; |
| 136 struct FileChooserParams; | 135 struct FileChooserParams; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 240 |
| 242 // Indicates whether this page has been focused by the browser. | 241 // Indicates whether this page has been focused by the browser. |
| 243 bool has_focus() const { return has_focus_; } | 242 bool has_focus() const { return has_focus_; } |
| 244 | 243 |
| 245 // Sets page-level focus in this view and notifies plugins and Blink's | 244 // Sets page-level focus in this view and notifies plugins and Blink's |
| 246 // FocusController. | 245 // FocusController. |
| 247 void SetFocus(bool enable); | 246 void SetFocus(bool enable); |
| 248 | 247 |
| 249 void AttachWebFrameWidget(blink::WebFrameWidget* frame_widget); | 248 void AttachWebFrameWidget(blink::WebFrameWidget* frame_widget); |
| 250 | 249 |
| 251 // Plugin-related functions -------------------------------------------------- | |
| 252 | |
| 253 #if defined(ENABLE_PLUGINS) | |
| 254 PepperPluginInstanceImpl* focused_pepper_plugin() { | |
| 255 return focused_pepper_plugin_; | |
| 256 } | |
| 257 PepperPluginInstanceImpl* pepper_last_mouse_event_target() { | |
| 258 return pepper_last_mouse_event_target_; | |
| 259 } | |
| 260 void set_pepper_last_mouse_event_target(PepperPluginInstanceImpl* plugin) { | |
| 261 pepper_last_mouse_event_target_ = plugin; | |
| 262 } | |
| 263 | |
| 264 // Indicates that the given instance has been created. | |
| 265 void PepperInstanceCreated(PepperPluginInstanceImpl* instance); | |
| 266 | |
| 267 // Indicates that the given instance is being destroyed. This is called from | |
| 268 // the destructor, so it's important that the instance is not dereferenced | |
| 269 // from this call. | |
| 270 void PepperInstanceDeleted(PepperPluginInstanceImpl* instance); | |
| 271 | |
| 272 // Notification that the given plugin is focused or unfocused. | |
| 273 void PepperFocusChanged(PepperPluginInstanceImpl* instance, bool focused); | |
| 274 #endif // ENABLE_PLUGINS | |
| 275 | |
| 276 void TransferActiveWheelFlingAnimation( | 250 void TransferActiveWheelFlingAnimation( |
| 277 const blink::WebActiveWheelFlingParameters& params); | 251 const blink::WebActiveWheelFlingParameters& params); |
| 278 | 252 |
| 279 // Starts a timer to send an UpdateState message on behalf of |frame|, if the | 253 // Starts a timer to send an UpdateState message on behalf of |frame|, if the |
| 280 // timer isn't already running. This allows multiple state changing events to | 254 // timer isn't already running. This allows multiple state changing events to |
| 281 // be coalesced into one update. | 255 // be coalesced into one update. |
| 282 void StartNavStateSyncTimerIfNecessary(RenderFrameImpl* frame); | 256 void StartNavStateSyncTimerIfNecessary(RenderFrameImpl* frame); |
| 283 | 257 |
| 284 // Synchronously sends the current navigation state to the browser. | 258 // Synchronously sends the current navigation state to the browser. |
| 285 void SendUpdateState(); | 259 void SendUpdateState(); |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 void RenderWidgetDidSetColorProfile( | 570 void RenderWidgetDidSetColorProfile( |
| 597 const std::vector<char>& color_profile) override; | 571 const std::vector<char>& color_profile) override; |
| 598 void RenderWidgetFocusChangeComplete() override; | 572 void RenderWidgetFocusChangeComplete() override; |
| 599 bool DoesRenderWidgetHaveTouchEventHandlersAt( | 573 bool DoesRenderWidgetHaveTouchEventHandlersAt( |
| 600 const gfx::Point& point) const override; | 574 const gfx::Point& point) const override; |
| 601 void RenderWidgetDidHandleKeyEvent() override; | 575 void RenderWidgetDidHandleKeyEvent() override; |
| 602 bool RenderWidgetWillHandleGestureEvent( | 576 bool RenderWidgetWillHandleGestureEvent( |
| 603 const blink::WebGestureEvent& event) override; | 577 const blink::WebGestureEvent& event) override; |
| 604 bool RenderWidgetWillHandleMouseEvent( | 578 bool RenderWidgetWillHandleMouseEvent( |
| 605 const blink::WebMouseEvent& event) override; | 579 const blink::WebMouseEvent& event) override; |
| 606 void RenderWidgetDidCommitAndDrawCompositorFrame() override; | |
| 607 void RenderWidgetDidFlushPaint() override; | 580 void RenderWidgetDidFlushPaint() override; |
| 608 | 581 |
| 609 // Old WebFrameClient implementations ---------------------------------------- | 582 // Old WebFrameClient implementations ---------------------------------------- |
| 610 | 583 |
| 611 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the | 584 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the |
| 612 // WebFrameClient. However, many implementations of WebFrameClient methods | 585 // WebFrameClient. However, many implementations of WebFrameClient methods |
| 613 // still live here and are called from RenderFrameImpl. These implementations | 586 // still live here and are called from RenderFrameImpl. These implementations |
| 614 // are to be moved to RenderFrameImpl <http://crbug.com/361761>. | 587 // are to be moved to RenderFrameImpl <http://crbug.com/361761>. |
| 615 | 588 |
| 616 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); | 589 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 // intents to be launched if aborted. | 922 // intents to be launched if aborted. |
| 950 size_t expected_content_intent_id_; | 923 size_t expected_content_intent_id_; |
| 951 | 924 |
| 952 // List of click-based content detectors. | 925 // List of click-based content detectors. |
| 953 std::vector<std::unique_ptr<ContentDetector>> content_detectors_; | 926 std::vector<std::unique_ptr<ContentDetector>> content_detectors_; |
| 954 | 927 |
| 955 // A date/time picker object for date and time related input elements. | 928 // A date/time picker object for date and time related input elements. |
| 956 std::unique_ptr<RendererDateTimePicker> date_time_picker_client_; | 929 std::unique_ptr<RendererDateTimePicker> date_time_picker_client_; |
| 957 #endif | 930 #endif |
| 958 | 931 |
| 959 // Plugins ------------------------------------------------------------------- | |
| 960 #if defined(ENABLE_PLUGINS) | |
| 961 typedef std::set<PepperPluginInstanceImpl*> PepperPluginSet; | |
| 962 PepperPluginSet active_pepper_instances_; | |
| 963 | |
| 964 // TODO(jam): these belong on RenderFrame, once the browser knows which frame | |
| 965 // is focused and sends the IPCs which use these to the correct frame. Until | |
| 966 // then, we must store these on RenderView as that's the one place that knows | |
| 967 // about all the RenderFrames for a page. | |
| 968 | |
| 969 // Whether or not the focus is on a PPAPI plugin | |
| 970 PepperPluginInstanceImpl* focused_pepper_plugin_; | |
| 971 | |
| 972 // The plugin instance that received the last mouse event. It is set to NULL | |
| 973 // if the last mouse event went to elements other than Pepper plugins. | |
| 974 // |pepper_last_mouse_event_target_| is not owned by this class. We depend on | |
| 975 // the RenderFrameImpl to NULL it out when it destructs. | |
| 976 PepperPluginInstanceImpl* pepper_last_mouse_event_target_; | |
| 977 #endif | |
| 978 | |
| 979 // Misc ---------------------------------------------------------------------- | 932 // Misc ---------------------------------------------------------------------- |
| 980 | 933 |
| 981 // The current and pending file chooser completion objects. If the queue is | 934 // The current and pending file chooser completion objects. If the queue is |
| 982 // nonempty, the first item represents the currently running file chooser | 935 // nonempty, the first item represents the currently running file chooser |
| 983 // callback, and the remaining elements are the other file chooser completion | 936 // callback, and the remaining elements are the other file chooser completion |
| 984 // still waiting to be run (in order). | 937 // still waiting to be run (in order). |
| 985 struct PendingFileChooser; | 938 struct PendingFileChooser; |
| 986 std::deque<std::unique_ptr<PendingFileChooser>> file_chooser_completions_; | 939 std::deque<std::unique_ptr<PendingFileChooser>> file_chooser_completions_; |
| 987 | 940 |
| 988 // The current directory enumeration callback | 941 // The current directory enumeration callback |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 // use the Observer interface to filter IPC messages and receive frame change | 978 // use the Observer interface to filter IPC messages and receive frame change |
| 1026 // notifications. | 979 // notifications. |
| 1027 // --------------------------------------------------------------------------- | 980 // --------------------------------------------------------------------------- |
| 1028 | 981 |
| 1029 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 982 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1030 }; | 983 }; |
| 1031 | 984 |
| 1032 } // namespace content | 985 } // namespace content |
| 1033 | 986 |
| 1034 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 987 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |