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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 friend class RenderFrameHostImpl; | 381 friend class RenderFrameHostImpl; |
382 friend class TestRenderViewHost; | 382 friend class TestRenderViewHost; |
383 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost); | 383 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost); |
384 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane); | 384 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane); |
385 | 385 |
386 // TODO(creis): Move to a private namespace on RenderFrameHostImpl. | 386 // TODO(creis): Move to a private namespace on RenderFrameHostImpl. |
387 // Delay to wait on closing the WebContents for a beforeunload/unload handler | 387 // Delay to wait on closing the WebContents for a beforeunload/unload handler |
388 // to fire. | 388 // to fire. |
389 static const int64 kUnloadTimeoutMS; | 389 static const int64 kUnloadTimeoutMS; |
390 | 390 |
| 391 // Returns whether the current RenderProcessHost has read access to the files |
| 392 // reported in |state|. |
391 bool CanAccessFilesOfPageState(const PageState& state) const; | 393 bool CanAccessFilesOfPageState(const PageState& state) const; |
392 | 394 |
| 395 // Grants the current RenderProcessHost read access to any file listed in |
| 396 // |validated_state|. It is important that the PageState has been validated |
| 397 // upon receipt from the renderer process to prevent it from forging access to |
| 398 // files without the user's consent. |
| 399 void GrantFileAccessFromPageState(const PageState& validated_state); |
| 400 |
393 // The number of RenderFrameHosts which have a reference to this RVH. | 401 // The number of RenderFrameHosts which have a reference to this RVH. |
394 int frames_ref_count_; | 402 int frames_ref_count_; |
395 | 403 |
396 // Our delegate, which wants to know about changes in the RenderView. | 404 // Our delegate, which wants to know about changes in the RenderView. |
397 RenderViewHostDelegate* delegate_; | 405 RenderViewHostDelegate* delegate_; |
398 | 406 |
399 // The SiteInstance associated with this RenderViewHost. All pages drawn | 407 // The SiteInstance associated with this RenderViewHost. All pages drawn |
400 // in this RenderViewHost are part of this SiteInstance. Cannot change | 408 // in this RenderViewHost are part of this SiteInstance. Cannot change |
401 // over time. | 409 // over time. |
402 scoped_refptr<SiteInstanceImpl> instance_; | 410 scoped_refptr<SiteInstanceImpl> instance_; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 476 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
469 }; | 477 }; |
470 | 478 |
471 #if defined(COMPILER_MSVC) | 479 #if defined(COMPILER_MSVC) |
472 #pragma warning(pop) | 480 #pragma warning(pop) |
473 #endif | 481 #endif |
474 | 482 |
475 } // namespace content | 483 } // namespace content |
476 | 484 |
477 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 485 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |