| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 bool IsMouseLocked() const; | 422 bool IsMouseLocked() const; |
| 423 | 423 |
| 424 // RenderViewHost overrides this method to report when in fullscreen mode. | 424 // RenderViewHost overrides this method to report when in fullscreen mode. |
| 425 virtual bool IsFullscreen() const; | 425 virtual bool IsFullscreen() const; |
| 426 | 426 |
| 427 // Indicates if the render widget host should track the render widget's size | 427 // Indicates if the render widget host should track the render widget's size |
| 428 // as opposed to visa versa. | 428 // as opposed to visa versa. |
| 429 void SetShouldAutoResize(bool enable); | 429 void SetShouldAutoResize(bool enable); |
| 430 | 430 |
| 431 protected: | 431 protected: |
| 432 // Expose increment/decrement of the in-flight event count, so |
| 433 // RenderViewHostImpl can account for in-flight beforeunload/unload events. |
| 434 int increment_in_flight_event_count() { return ++in_flight_event_count_; } |
| 435 int decrement_in_flight_event_count() { return --in_flight_event_count_; } |
| 436 |
| 432 // The View associated with the RenderViewHost. The lifetime of this object | 437 // The View associated with the RenderViewHost. The lifetime of this object |
| 433 // is associated with the lifetime of the Render process. If the Renderer | 438 // is associated with the lifetime of the Render process. If the Renderer |
| 434 // crashes, its View is destroyed and this pointer becomes NULL, even though | 439 // crashes, its View is destroyed and this pointer becomes NULL, even though |
| 435 // render_view_host_ lives on to load another URL (creating a new View while | 440 // render_view_host_ lives on to load another URL (creating a new View while |
| 436 // doing so). | 441 // doing so). |
| 437 RenderWidgetHostViewPort* view_; | 442 RenderWidgetHostViewPort* view_; |
| 438 | 443 |
| 439 // true if a renderer has once been valid. We use this flag to display a sad | 444 // true if a renderer has once been valid. We use this flag to display a sad |
| 440 // tab only when we lose our renderer and not if a paint occurs during | 445 // tab only when we lose our renderer and not if a paint occurs during |
| 441 // initialization. | 446 // initialization. |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 723 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 719 | 724 |
| 720 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 725 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
| 721 | 726 |
| 722 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 727 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 723 }; | 728 }; |
| 724 | 729 |
| 725 } // namespace content | 730 } // namespace content |
| 726 | 731 |
| 727 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 732 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |