| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 // Returns whether the current RenderProcessHost has read access to the files | 344 // Returns whether the current RenderProcessHost has read access to the files |
| 339 // reported in |state|. | 345 // reported in |state|. |
| 340 bool CanAccessFilesOfPageState(const PageState& state) const; | 346 bool CanAccessFilesOfPageState(const PageState& state) const; |
| 341 | 347 |
| 342 // Grants the current RenderProcessHost read access to any file listed in | 348 // Grants the current RenderProcessHost read access to any file listed in |
| 343 // |validated_state|. It is important that the PageState has been validated | 349 // |validated_state|. It is important that the PageState has been validated |
| 344 // upon receipt from the renderer process to prevent it from forging access to | 350 // upon receipt from the renderer process to prevent it from forging access to |
| 345 // files without the user's consent. | 351 // files without the user's consent. |
| 346 void GrantFileAccessFromPageState(const PageState& validated_state); | 352 void GrantFileAccessFromPageState(const PageState& validated_state); |
| 347 | 353 |
| 354 // 1. Grants permissions to URL (if any) |
| 355 // 2. Grants permissions to filenames |
| 356 // 3. Grants permissions to file system files. |
| 357 // 4. Register the files with the IsolatedContext. |
| 358 void GrantFileAccessFromDropData(DropData* drop_data); |
| 359 |
| 348 // The RenderWidgetHost. | 360 // The RenderWidgetHost. |
| 349 std::unique_ptr<RenderWidgetHostImpl> render_widget_host_; | 361 std::unique_ptr<RenderWidgetHostImpl> render_widget_host_; |
| 350 | 362 |
| 351 // The number of RenderFrameHosts which have a reference to this RVH. | 363 // The number of RenderFrameHosts which have a reference to this RVH. |
| 352 int frames_ref_count_; | 364 int frames_ref_count_; |
| 353 | 365 |
| 354 // Our delegate, which wants to know about changes in the RenderView. | 366 // Our delegate, which wants to know about changes in the RenderView. |
| 355 RenderViewHostDelegate* delegate_; | 367 RenderViewHostDelegate* delegate_; |
| 356 | 368 |
| 357 // The SiteInstance associated with this RenderViewHost. All pages drawn | 369 // The SiteInstance associated with this RenderViewHost. All pages drawn |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 bool render_view_ready_on_process_launch_; | 418 bool render_view_ready_on_process_launch_; |
| 407 | 419 |
| 408 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; | 420 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; |
| 409 | 421 |
| 410 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 422 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 411 }; | 423 }; |
| 412 | 424 |
| 413 } // namespace content | 425 } // namespace content |
| 414 | 426 |
| 415 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 427 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |