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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
376 | 376 |
377 // Creates a full screen RenderWidget. | 377 // Creates a full screen RenderWidget. |
378 void CreateNewFullscreenWidget(int route_id); | 378 void CreateNewFullscreenWidget(int route_id); |
379 | 379 |
380 #if defined(OS_MACOSX) | 380 #if defined(OS_MACOSX) |
381 // Select popup menu related methods (for external popup menus). | 381 // Select popup menu related methods (for external popup menus). |
382 void DidSelectPopupMenuItem(int selected_index); | 382 void DidSelectPopupMenuItem(int selected_index); |
383 void DidCancelPopupMenu(); | 383 void DidCancelPopupMenu(); |
384 #endif | 384 #endif |
385 | 385 |
386 // User rotated the screen. Calls the "onorientationchange" Javascript hook. | |
387 void SendOrientationChangeEvent(int orientation); | |
388 | |
386 void set_save_accessibility_tree_for_testing(bool save) { | 389 void set_save_accessibility_tree_for_testing(bool save) { |
387 save_accessibility_tree_for_testing_ = save; | 390 save_accessibility_tree_for_testing_ = save; |
388 } | 391 } |
389 | 392 |
390 void set_send_accessibility_updated_notifications(bool send) { | 393 void set_send_accessibility_updated_notifications(bool send) { |
391 send_accessibility_updated_notifications_ = send; | 394 send_accessibility_updated_notifications_ = send; |
392 } | 395 } |
393 | 396 |
394 const webkit_glue::WebAccessibility& accessibility_tree_for_testing() { | 397 const webkit_glue::WebAccessibility& accessibility_tree_for_testing() { |
395 return accessibility_tree_; | 398 return accessibility_tree_; |
396 } | 399 } |
397 | 400 |
398 bool is_waiting_for_unload_ack_for_testing() { | 401 bool is_waiting_for_unload_ack_for_testing() { |
399 return is_waiting_for_unload_ack_; | 402 return is_waiting_for_unload_ack_; |
400 } | 403 } |
401 | 404 |
402 // Checks that the given renderer can request |url|, if not it sets it to | 405 // Checks that the given renderer can request |url|, if not it sets it to |
403 // about:blank. | 406 // about:blank. |
404 // empty_allowed must be set to false for navigations for security reasons. | 407 // empty_allowed must be set to false for navigations for security reasons. |
405 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, | 408 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, |
406 int renderer_id, | 409 int renderer_id, |
407 bool empty_allowed, | 410 bool empty_allowed, |
408 GURL* url); | 411 GURL* url); |
409 | 412 |
410 // NOTE: Do not add functions that just send an IPC message that are called in | 413 // NOTE: Do not add functions that just send an IPC message that are called in |
411 // one or two places. Have the caller send the IPC message directly. | 414 // one or two places. Have the caller send the IPC message directly (unless |
415 // the caller places are in different platforms, in which case it's better | |
416 // to keep them consistent). | |
bulach
2012/05/14 17:10:49
I tried to clarify this a bit, let me know if this
| |
412 | 417 |
413 protected: | 418 protected: |
414 friend class RenderViewHostObserver; | 419 friend class RenderViewHostObserver; |
415 | 420 |
416 // Add and remove observers for filtering IPC messages. Clients must be sure | 421 // Add and remove observers for filtering IPC messages. Clients must be sure |
417 // to remove the observer before they go away. | 422 // to remove the observer before they go away. |
418 void AddObserver(RenderViewHostObserver* observer); | 423 void AddObserver(RenderViewHostObserver* observer); |
419 void RemoveObserver(RenderViewHostObserver* observer); | 424 void RemoveObserver(RenderViewHostObserver* observer); |
420 | 425 |
421 // RenderWidgetHost protected overrides. | 426 // RenderWidgetHost protected overrides. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
644 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 649 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
645 }; | 650 }; |
646 | 651 |
647 #if defined(COMPILER_MSVC) | 652 #if defined(COMPILER_MSVC) |
648 #pragma warning(pop) | 653 #pragma warning(pop) |
649 #endif | 654 #endif |
650 | 655 |
651 } // namespace content | 656 } // namespace content |
652 | 657 |
653 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 658 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |