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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 } | 383 } |
384 | 384 |
385 const webkit_glue::WebAccessibility& accessibility_tree_for_testing() { | 385 const webkit_glue::WebAccessibility& accessibility_tree_for_testing() { |
386 return accessibility_tree_; | 386 return accessibility_tree_; |
387 } | 387 } |
388 | 388 |
389 bool is_waiting_for_unload_ack_for_testing() { | 389 bool is_waiting_for_unload_ack_for_testing() { |
390 return is_waiting_for_unload_ack_; | 390 return is_waiting_for_unload_ack_; |
391 } | 391 } |
392 | 392 |
393 // Checks that the given renderer can request |url|, if not it sets it to an | 393 // Checks that the given renderer can request |url|, if not it sets it to |
394 // empty url. | 394 // about:blank. |
| 395 // empty_allowed must be set to false for navigations for security reasons. |
395 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, | 396 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, |
396 int renderer_id, | 397 int renderer_id, |
| 398 bool empty_allowed, |
397 GURL* url); | 399 GURL* url); |
398 | 400 |
399 // NOTE: Do not add functions that just send an IPC message that are called in | 401 // NOTE: Do not add functions that just send an IPC message that are called in |
400 // one or two places. Have the caller send the IPC message directly. | 402 // one or two places. Have the caller send the IPC message directly. |
401 | 403 |
402 protected: | 404 protected: |
403 friend class RenderViewHostObserver; | 405 friend class RenderViewHostObserver; |
404 | 406 |
405 // Add and remove observers for filtering IPC messages. Clients must be sure | 407 // Add and remove observers for filtering IPC messages. Clients must be sure |
406 // to remove the observer before they go away. | 408 // to remove the observer before they go away. |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 624 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
623 }; | 625 }; |
624 | 626 |
625 #if defined(COMPILER_MSVC) | 627 #if defined(COMPILER_MSVC) |
626 #pragma warning(pop) | 628 #pragma warning(pop) |
627 #endif | 629 #endif |
628 | 630 |
629 } // namespace content | 631 } // namespace content |
630 | 632 |
631 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 633 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |