| 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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 void DirectoryEnumerationFinished( | 100 void DirectoryEnumerationFinished( |
| 101 int request_id, | 101 int request_id, |
| 102 const std::vector<base::FilePath>& files) override; | 102 const std::vector<base::FilePath>& files) override; |
| 103 void DisableScrollbarsForThreshold(const gfx::Size& size) override; | 103 void DisableScrollbarsForThreshold(const gfx::Size& size) override; |
| 104 void DragSourceEndedAt(int client_x, | 104 void DragSourceEndedAt(int client_x, |
| 105 int client_y, | 105 int client_y, |
| 106 int screen_x, | 106 int screen_x, |
| 107 int screen_y, | 107 int screen_y, |
| 108 blink::WebDragOperation operation) override; | 108 blink::WebDragOperation operation) override; |
| 109 void DragSourceSystemDragEnded() override; | 109 void DragSourceSystemDragEnded() override; |
| 110 // |drop_data| must have been filtered. The embedder should call | |
| 111 // FilterDropData before passing the drop data to RVHI. | |
| 112 void DragTargetDragEnter(const DropData& drop_data, | |
| 113 const gfx::Point& client_pt, | |
| 114 const gfx::Point& screen_pt, | |
| 115 blink::WebDragOperationsMask operations_allowed, | |
| 116 int key_modifiers) override; | |
| 117 void DragTargetDragEnterWithMetaData( | |
| 118 const std::vector<DropData::Metadata>& metadata, | |
| 119 const gfx::Point& client_pt, | |
| 120 const gfx::Point& screen_pt, | |
| 121 blink::WebDragOperationsMask operations_allowed, | |
| 122 int key_modifiers) override; | |
| 123 void DragTargetDragOver(const gfx::Point& client_pt, | |
| 124 const gfx::Point& screen_pt, | |
| 125 blink::WebDragOperationsMask operations_allowed, | |
| 126 int key_modifiers) override; | |
| 127 void DragTargetDragLeave() override; | |
| 128 // |drop_data| must have been filtered. The embedder should call | |
| 129 // FilterDropData before passing the drop data to RVHI. | |
| 130 void DragTargetDrop(const DropData& drop_data, | |
| 131 const gfx::Point& client_pt, | |
| 132 const gfx::Point& screen_pt, | |
| 133 int key_modifiers) override; | |
| 134 void FilterDropData(DropData* drop_data) override; | |
| 135 void EnableAutoResize(const gfx::Size& min_size, | 110 void EnableAutoResize(const gfx::Size& min_size, |
| 136 const gfx::Size& max_size) override; | 111 const gfx::Size& max_size) override; |
| 137 void DisableAutoResize(const gfx::Size& new_size) override; | 112 void DisableAutoResize(const gfx::Size& new_size) override; |
| 138 void EnablePreferredSizeMode() override; | 113 void EnablePreferredSizeMode() override; |
| 139 void ExecuteMediaPlayerActionAtLocation( | 114 void ExecuteMediaPlayerActionAtLocation( |
| 140 const gfx::Point& location, | 115 const gfx::Point& location, |
| 141 const blink::WebMediaPlayerAction& action) override; | 116 const blink::WebMediaPlayerAction& action) override; |
| 142 void ExecutePluginActionAtLocation( | 117 void ExecutePluginActionAtLocation( |
| 143 const gfx::Point& location, | 118 const gfx::Point& location, |
| 144 const blink::WebPluginAction& action) override; | 119 const blink::WebPluginAction& action) override; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 // Delay to wait on closing the WebContents for a beforeunload/unload handler | 293 // Delay to wait on closing the WebContents for a beforeunload/unload handler |
| 319 // to fire. | 294 // to fire. |
| 320 static const int64_t kUnloadTimeoutMS; | 295 static const int64_t kUnloadTimeoutMS; |
| 321 | 296 |
| 322 // Returns the content specific prefs for this RenderViewHost. | 297 // Returns the content specific prefs for this RenderViewHost. |
| 323 // TODO(creis): Move most of this method to RenderProcessHost, since it's | 298 // TODO(creis): Move most of this method to RenderProcessHost, since it's |
| 324 // mostly the same across all RVHs in a process. Move the rest to RFH. | 299 // mostly the same across all RVHs in a process. Move the rest to RFH. |
| 325 // See https://crbug.com/304341. | 300 // See https://crbug.com/304341. |
| 326 WebPreferences ComputeWebkitPrefs(); | 301 WebPreferences ComputeWebkitPrefs(); |
| 327 | 302 |
| 328 // 1. Grants permissions to URL (if any) | |
| 329 // 2. Grants permissions to filenames | |
| 330 // 3. Grants permissions to file system files. | |
| 331 // 4. Register the files with the IsolatedContext. | |
| 332 void GrantFileAccessFromDropData(DropData* drop_data); | |
| 333 | |
| 334 // The RenderWidgetHost. | 303 // The RenderWidgetHost. |
| 335 std::unique_ptr<RenderWidgetHostImpl> render_widget_host_; | 304 std::unique_ptr<RenderWidgetHostImpl> render_widget_host_; |
| 336 | 305 |
| 337 // The number of RenderFrameHosts which have a reference to this RVH. | 306 // The number of RenderFrameHosts which have a reference to this RVH. |
| 338 int frames_ref_count_; | 307 int frames_ref_count_; |
| 339 | 308 |
| 340 // Our delegate, which wants to know about changes in the RenderView. | 309 // Our delegate, which wants to know about changes in the RenderView. |
| 341 RenderViewHostDelegate* delegate_; | 310 RenderViewHostDelegate* delegate_; |
| 342 | 311 |
| 343 // The SiteInstance associated with this RenderViewHost. All pages drawn | 312 // The SiteInstance associated with this RenderViewHost. All pages drawn |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 bool render_view_ready_on_process_launch_; | 356 bool render_view_ready_on_process_launch_; |
| 388 | 357 |
| 389 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; | 358 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; |
| 390 | 359 |
| 391 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 360 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 392 }; | 361 }; |
| 393 | 362 |
| 394 } // namespace content | 363 } // namespace content |
| 395 | 364 |
| 396 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 365 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |