| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 void increment_ref_count() { ++frames_ref_count_; } | 319 void increment_ref_count() { ++frames_ref_count_; } |
| 320 | 320 |
| 321 // Decreases the refcounting on this RVH. This is done by the FrameTree on | 321 // Decreases the refcounting on this RVH. This is done by the FrameTree on |
| 322 // destruction of a RenderFrameHost. | 322 // destruction of a RenderFrameHost. |
| 323 void decrement_ref_count() { --frames_ref_count_; } | 323 void decrement_ref_count() { --frames_ref_count_; } |
| 324 | 324 |
| 325 // Returns the refcount on this RVH, that is the number of RenderFrameHosts | 325 // Returns the refcount on this RVH, that is the number of RenderFrameHosts |
| 326 // currently using it. | 326 // currently using it. |
| 327 int ref_count() { return frames_ref_count_; } | 327 int ref_count() { return frames_ref_count_; } |
| 328 | 328 |
| 329 // TODO(avi): Move to RenderFrameHost once PageState is broken up into | |
| 330 // FrameStates. | |
| 331 int nav_entry_id() const { return nav_entry_id_; } | |
| 332 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } | |
| 333 | |
| 334 // NOTE: Do not add functions that just send an IPC message that are called in | 329 // NOTE: Do not add functions that just send an IPC message that are called in |
| 335 // one or two places. Have the caller send the IPC message directly (unless | 330 // one or two places. Have the caller send the IPC message directly (unless |
| 336 // the caller places are in different platforms, in which case it's better | 331 // the caller places are in different platforms, in which case it's better |
| 337 // to keep them consistent). | 332 // to keep them consistent). |
| 338 | 333 |
| 339 protected: | 334 protected: |
| 340 // RenderWidgetHost protected overrides. | 335 // RenderWidgetHost protected overrides. |
| 341 void OnUserGesture() override; | 336 void OnUserGesture() override; |
| 342 void NotifyRendererUnresponsive() override; | 337 void NotifyRendererUnresponsive() override; |
| 343 void NotifyRendererResponsive() override; | 338 void NotifyRendererResponsive() override; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 427 |
| 433 // A bitwise OR of bindings types that have been enabled for this RenderView. | 428 // A bitwise OR of bindings types that have been enabled for this RenderView. |
| 434 // See BindingsPolicy for details. | 429 // See BindingsPolicy for details. |
| 435 int enabled_bindings_; | 430 int enabled_bindings_; |
| 436 | 431 |
| 437 // The most recent page ID we've heard from the renderer process. This is | 432 // The most recent page ID we've heard from the renderer process. This is |
| 438 // used as context when other session history related IPCs arrive. | 433 // used as context when other session history related IPCs arrive. |
| 439 // TODO(creis): Allocate this in WebContents/NavigationController instead. | 434 // TODO(creis): Allocate this in WebContents/NavigationController instead. |
| 440 int32 page_id_; | 435 int32 page_id_; |
| 441 | 436 |
| 442 // The unique ID of the latest NavigationEntry that this RenderViewHost is | |
| 443 // showing. TODO(avi): Move to RenderFrameHost once PageState is broken up | |
| 444 // into FrameStates. | |
| 445 int nav_entry_id_; | |
| 446 | |
| 447 // Tracks whether this RenderViewHost is in an active state. False if the | 437 // Tracks whether this RenderViewHost is in an active state. False if the |
| 448 // main frame is pending swap out, pending deletion, or swapped out, because | 438 // main frame is pending swap out, pending deletion, or swapped out, because |
| 449 // it is not visible to the user in any of these cases. | 439 // it is not visible to the user in any of these cases. |
| 450 bool is_active_; | 440 bool is_active_; |
| 451 | 441 |
| 452 // True if this RenderViewHost is pending deletion. | 442 // True if this RenderViewHost is pending deletion. |
| 453 bool is_pending_deletion_; | 443 bool is_pending_deletion_; |
| 454 | 444 |
| 455 // Tracks whether the main frame RenderFrameHost is swapped out. Unlike | 445 // Tracks whether the main frame RenderFrameHost is swapped out. Unlike |
| 456 // is_active_, this is false when the frame is pending swap out or deletion. | 446 // is_active_, this is false when the frame is pending swap out or deletion. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 482 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 493 }; | 483 }; |
| 494 | 484 |
| 495 #if defined(COMPILER_MSVC) | 485 #if defined(COMPILER_MSVC) |
| 496 #pragma warning(pop) | 486 #pragma warning(pop) |
| 497 #endif | 487 #endif |
| 498 | 488 |
| 499 } // namespace content | 489 } // namespace content |
| 500 | 490 |
| 501 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 491 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |