| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 const base::Closure& callback); | 415 const base::Closure& callback); |
| 416 void SetAccessibilityLoadCompleteCallbackForTesting( | 416 void SetAccessibilityLoadCompleteCallbackForTesting( |
| 417 const base::Closure& callback); | 417 const base::Closure& callback); |
| 418 void SetAccessibilityOtherCallbackForTesting( | 418 void SetAccessibilityOtherCallbackForTesting( |
| 419 const base::Closure& callback); | 419 const base::Closure& callback); |
| 420 | 420 |
| 421 bool is_waiting_for_unload_ack_for_testing() { | 421 bool is_waiting_for_unload_ack_for_testing() { |
| 422 return is_waiting_for_unload_ack_; | 422 return is_waiting_for_unload_ack_; |
| 423 } | 423 } |
| 424 | 424 |
| 425 // Returns whether the given URL is allowed to commit in the current process. |
| 426 // This is a more conservative check than FilterURL, since it will be used to |
| 427 // kill processes that commit unauthorized URLs. |
| 428 bool CanCommitURL(const GURL& url); |
| 429 |
| 425 // Checks that the given renderer can request |url|, if not it sets it to | 430 // Checks that the given renderer can request |url|, if not it sets it to |
| 426 // about:blank. | 431 // about:blank. |
| 427 // empty_allowed must be set to false for navigations for security reasons. | 432 // empty_allowed must be set to false for navigations for security reasons. |
| 428 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, | 433 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, |
| 429 const RenderProcessHost* process, | 434 const RenderProcessHost* process, |
| 430 bool empty_allowed, | 435 bool empty_allowed, |
| 431 GURL* url); | 436 GURL* url); |
| 432 | 437 |
| 433 // NOTE: Do not add functions that just send an IPC message that are called in | 438 // NOTE: Do not add functions that just send an IPC message that are called in |
| 434 // one or two places. Have the caller send the IPC message directly (unless | 439 // one or two places. Have the caller send the IPC message directly (unless |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 694 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 690 }; | 695 }; |
| 691 | 696 |
| 692 #if defined(COMPILER_MSVC) | 697 #if defined(COMPILER_MSVC) |
| 693 #pragma warning(pop) | 698 #pragma warning(pop) |
| 694 #endif | 699 #endif |
| 695 | 700 |
| 696 } // namespace content | 701 } // namespace content |
| 697 | 702 |
| 698 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 703 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |