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_WIDGET_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 // Get the BrowserAccessibilityManager for the root of the frame tree, | 471 // Get the BrowserAccessibilityManager for the root of the frame tree, |
472 // or create it if it doesn't already exist. | 472 // or create it if it doesn't already exist. |
473 BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager(); | 473 BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager(); |
474 | 474 |
475 void RejectMouseLockOrUnlockIfNecessary(); | 475 void RejectMouseLockOrUnlockIfNecessary(); |
476 | 476 |
477 #if defined(OS_WIN) | 477 #if defined(OS_WIN) |
478 gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 478 gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
479 #endif | 479 #endif |
480 | 480 |
| 481 void set_renderer_initialized(bool renderer_initialized) { |
| 482 renderer_initialized_ = renderer_initialized; |
| 483 } |
| 484 |
481 protected: | 485 protected: |
482 RenderWidgetHostImpl* AsRenderWidgetHostImpl() override; | 486 RenderWidgetHostImpl* AsRenderWidgetHostImpl() override; |
483 | 487 |
484 // Called when we receive a notification indicating that the renderer | 488 // Called when we receive a notification indicating that the renderer |
485 // process has gone. This will reset our state so that our state will be | 489 // process has gone. This will reset our state so that our state will be |
486 // consistent if a new renderer is created. | 490 // consistent if a new renderer is created. |
487 void RendererExited(base::TerminationStatus status, int exit_code); | 491 void RendererExited(base::TerminationStatus status, int exit_code); |
488 | 492 |
489 // Retrieves an id the renderer can use to refer to its view. | 493 // Retrieves an id the renderer can use to refer to its view. |
490 // This is used for various IPC messages, including plugins. | 494 // This is used for various IPC messages, including plugins. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 void SetInitialRenderSizeParams(const ViewMsg_Resize_Params& resize_params); | 550 void SetInitialRenderSizeParams(const ViewMsg_Resize_Params& resize_params); |
547 | 551 |
548 // Expose increment/decrement of the in-flight event count, so | 552 // Expose increment/decrement of the in-flight event count, so |
549 // RenderViewHostImpl can account for in-flight beforeunload/unload events. | 553 // RenderViewHostImpl can account for in-flight beforeunload/unload events. |
550 int increment_in_flight_event_count() { return ++in_flight_event_count_; } | 554 int increment_in_flight_event_count() { return ++in_flight_event_count_; } |
551 int decrement_in_flight_event_count() { | 555 int decrement_in_flight_event_count() { |
552 DCHECK_GT(in_flight_event_count_, 0); | 556 DCHECK_GT(in_flight_event_count_, 0); |
553 return --in_flight_event_count_; | 557 return --in_flight_event_count_; |
554 } | 558 } |
555 | 559 |
556 void set_renderer_initialized(bool renderer_initialized) { | |
557 renderer_initialized_ = renderer_initialized; | |
558 } | |
559 | |
560 bool renderer_initialized() const { return renderer_initialized_; } | 560 bool renderer_initialized() const { return renderer_initialized_; } |
561 | 561 |
562 // The View associated with the RenderViewHost. The lifetime of this object | 562 // The View associated with the RenderViewHost. The lifetime of this object |
563 // is associated with the lifetime of the Render process. If the Renderer | 563 // is associated with the lifetime of the Render process. If the Renderer |
564 // crashes, its View is destroyed and this pointer becomes NULL, even though | 564 // crashes, its View is destroyed and this pointer becomes NULL, even though |
565 // render_view_host_ lives on to load another URL (creating a new View while | 565 // render_view_host_ lives on to load another URL (creating a new View while |
566 // doing so). | 566 // doing so). |
567 RenderWidgetHostViewBase* view_; | 567 RenderWidgetHostViewBase* view_; |
568 | 568 |
569 // A weak pointer to the view. The above pointer should be weak, but changing | 569 // A weak pointer to the view. The above pointer should be weak, but changing |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 bool is_focused_; | 831 bool is_focused_; |
832 | 832 |
833 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 833 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
834 | 834 |
835 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 835 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
836 }; | 836 }; |
837 | 837 |
838 } // namespace content | 838 } // namespace content |
839 | 839 |
840 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 840 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |