| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 // Delay to wait on closing the WebContents for a beforeunload/unload handler | 330 // Delay to wait on closing the WebContents for a beforeunload/unload handler |
| 331 // to fire. | 331 // to fire. |
| 332 static const int64_t kUnloadTimeoutMS; | 332 static const int64_t kUnloadTimeoutMS; |
| 333 | 333 |
| 334 // Returns the content specific prefs for this RenderViewHost. | 334 // Returns the content specific prefs for this RenderViewHost. |
| 335 // TODO(creis): Move most of this method to RenderProcessHost, since it's | 335 // TODO(creis): Move most of this method to RenderProcessHost, since it's |
| 336 // mostly the same across all RVHs in a process. Move the rest to RFH. | 336 // mostly the same across all RVHs in a process. Move the rest to RFH. |
| 337 // See https://crbug.com/304341. | 337 // See https://crbug.com/304341. |
| 338 WebPreferences ComputeWebkitPrefs(); | 338 WebPreferences ComputeWebkitPrefs(); |
| 339 | 339 |
| 340 // Returns whether the current RenderProcessHost has read access to the files | |
| 341 // reported in |state|. | |
| 342 bool CanAccessFilesOfPageState(const PageState& state) const; | |
| 343 | |
| 344 // Grants the current RenderProcessHost read access to any file listed in | |
| 345 // |validated_state|. It is important that the PageState has been validated | |
| 346 // upon receipt from the renderer process to prevent it from forging access to | |
| 347 // files without the user's consent. | |
| 348 void GrantFileAccessFromPageState(const PageState& validated_state); | |
| 349 | |
| 350 // 1. Grants permissions to URL (if any) | 340 // 1. Grants permissions to URL (if any) |
| 351 // 2. Grants permissions to filenames | 341 // 2. Grants permissions to filenames |
| 352 // 3. Grants permissions to file system files. | 342 // 3. Grants permissions to file system files. |
| 353 // 4. Register the files with the IsolatedContext. | 343 // 4. Register the files with the IsolatedContext. |
| 354 void GrantFileAccessFromDropData(DropData* drop_data); | 344 void GrantFileAccessFromDropData(DropData* drop_data); |
| 355 | 345 |
| 356 // The RenderWidgetHost. | 346 // The RenderWidgetHost. |
| 357 std::unique_ptr<RenderWidgetHostImpl> render_widget_host_; | 347 std::unique_ptr<RenderWidgetHostImpl> render_widget_host_; |
| 358 | 348 |
| 359 // The number of RenderFrameHosts which have a reference to this RVH. | 349 // The number of RenderFrameHosts which have a reference to this RVH. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 bool render_view_ready_on_process_launch_; | 404 bool render_view_ready_on_process_launch_; |
| 415 | 405 |
| 416 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; | 406 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; |
| 417 | 407 |
| 418 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 408 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 419 }; | 409 }; |
| 420 | 410 |
| 421 } // namespace content | 411 } // namespace content |
| 422 | 412 |
| 423 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 413 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |