| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 void DirectoryEnumerationFinished( | 103 void DirectoryEnumerationFinished( |
| 104 int request_id, | 104 int request_id, |
| 105 const std::vector<base::FilePath>& files) override; | 105 const std::vector<base::FilePath>& files) override; |
| 106 void DisableScrollbarsForThreshold(const gfx::Size& size) override; | 106 void DisableScrollbarsForThreshold(const gfx::Size& size) override; |
| 107 void DragSourceEndedAt(int client_x, | 107 void DragSourceEndedAt(int client_x, |
| 108 int client_y, | 108 int client_y, |
| 109 int screen_x, | 109 int screen_x, |
| 110 int screen_y, | 110 int screen_y, |
| 111 blink::WebDragOperation operation) override; | 111 blink::WebDragOperation operation) override; |
| 112 void DragSourceSystemDragEnded() override; | 112 void DragSourceSystemDragEnded() override; |
| 113 // |drop_data| must have been filtered. The embedder should call |
| 114 // FilterDropData before passing the drop data to RVHI. |
| 113 void DragTargetDragEnter(const DropData& drop_data, | 115 void DragTargetDragEnter(const DropData& drop_data, |
| 114 const gfx::Point& client_pt, | 116 const gfx::Point& client_pt, |
| 115 const gfx::Point& screen_pt, | 117 const gfx::Point& screen_pt, |
| 116 blink::WebDragOperationsMask operations_allowed, | 118 blink::WebDragOperationsMask operations_allowed, |
| 117 int key_modifiers) override; | 119 int key_modifiers) override; |
| 118 void DragTargetDragOver(const gfx::Point& client_pt, | 120 void DragTargetDragOver(const gfx::Point& client_pt, |
| 119 const gfx::Point& screen_pt, | 121 const gfx::Point& screen_pt, |
| 120 blink::WebDragOperationsMask operations_allowed, | 122 blink::WebDragOperationsMask operations_allowed, |
| 121 int key_modifiers) override; | 123 int key_modifiers) override; |
| 122 void DragTargetDragLeave() override; | 124 void DragTargetDragLeave() override; |
| 123 void DragTargetDrop(const gfx::Point& client_pt, | 125 // |drop_data| must have been filtered. The embedder should call |
| 126 // FilterDropData before passing the drop data to RVHI. |
| 127 void DragTargetDrop(const DropData& drop_data, |
| 128 const gfx::Point& client_pt, |
| 124 const gfx::Point& screen_pt, | 129 const gfx::Point& screen_pt, |
| 125 int key_modifiers) override; | 130 int key_modifiers) override; |
| 131 void FilterDropData(DropData* drop_data) override; |
| 126 void EnableAutoResize(const gfx::Size& min_size, | 132 void EnableAutoResize(const gfx::Size& min_size, |
| 127 const gfx::Size& max_size) override; | 133 const gfx::Size& max_size) override; |
| 128 void DisableAutoResize(const gfx::Size& new_size) override; | 134 void DisableAutoResize(const gfx::Size& new_size) override; |
| 129 void EnablePreferredSizeMode() override; | 135 void EnablePreferredSizeMode() override; |
| 130 void ExecuteMediaPlayerActionAtLocation( | 136 void ExecuteMediaPlayerActionAtLocation( |
| 131 const gfx::Point& location, | 137 const gfx::Point& location, |
| 132 const blink::WebMediaPlayerAction& action) override; | 138 const blink::WebMediaPlayerAction& action) override; |
| 133 void ExecutePluginActionAtLocation( | 139 void ExecutePluginActionAtLocation( |
| 134 const gfx::Point& location, | 140 const gfx::Point& location, |
| 135 const blink::WebPluginAction& action) override; | 141 const blink::WebPluginAction& action) override; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // Returns whether the current RenderProcessHost has read access to the files | 340 // Returns whether the current RenderProcessHost has read access to the files |
| 335 // reported in |state|. | 341 // reported in |state|. |
| 336 bool CanAccessFilesOfPageState(const PageState& state) const; | 342 bool CanAccessFilesOfPageState(const PageState& state) const; |
| 337 | 343 |
| 338 // Grants the current RenderProcessHost read access to any file listed in | 344 // Grants the current RenderProcessHost read access to any file listed in |
| 339 // |validated_state|. It is important that the PageState has been validated | 345 // |validated_state|. It is important that the PageState has been validated |
| 340 // upon receipt from the renderer process to prevent it from forging access to | 346 // upon receipt from the renderer process to prevent it from forging access to |
| 341 // files without the user's consent. | 347 // files without the user's consent. |
| 342 void GrantFileAccessFromPageState(const PageState& validated_state); | 348 void GrantFileAccessFromPageState(const PageState& validated_state); |
| 343 | 349 |
| 350 // 1. Grants permissions to URL (if any) |
| 351 // 2. Grants permissions to filenames |
| 352 // 3. Grants permissions to file system files. |
| 353 // 4. Register the files with the IsolatedContext. |
| 354 void GrantFileAccessFromDropData(DropData* drop_data); |
| 355 |
| 344 // The RenderWidgetHost. | 356 // The RenderWidgetHost. |
| 345 std::unique_ptr<RenderWidgetHostImpl> render_widget_host_; | 357 std::unique_ptr<RenderWidgetHostImpl> render_widget_host_; |
| 346 | 358 |
| 347 // The number of RenderFrameHosts which have a reference to this RVH. | 359 // The number of RenderFrameHosts which have a reference to this RVH. |
| 348 int frames_ref_count_; | 360 int frames_ref_count_; |
| 349 | 361 |
| 350 // Our delegate, which wants to know about changes in the RenderView. | 362 // Our delegate, which wants to know about changes in the RenderView. |
| 351 RenderViewHostDelegate* delegate_; | 363 RenderViewHostDelegate* delegate_; |
| 352 | 364 |
| 353 // The SiteInstance associated with this RenderViewHost. All pages drawn | 365 // The SiteInstance associated with this RenderViewHost. All pages drawn |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 bool render_view_ready_on_process_launch_; | 414 bool render_view_ready_on_process_launch_; |
| 403 | 415 |
| 404 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; | 416 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; |
| 405 | 417 |
| 406 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 418 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 407 }; | 419 }; |
| 408 | 420 |
| 409 } // namespace content | 421 } // namespace content |
| 410 | 422 |
| 411 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 423 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |