| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 bool IsMouseLocked() const; | 407 bool IsMouseLocked() const; |
| 408 | 408 |
| 409 // RenderViewHost overrides this method to report when in fullscreen mode. | 409 // RenderViewHost overrides this method to report when in fullscreen mode. |
| 410 virtual bool IsFullscreen() const; | 410 virtual bool IsFullscreen() const; |
| 411 | 411 |
| 412 // Indicates if the render widget host should track the render widget's size | 412 // Indicates if the render widget host should track the render widget's size |
| 413 // as opposed to visa versa. | 413 // as opposed to visa versa. |
| 414 void SetShouldAutoResize(bool enable); | 414 void SetShouldAutoResize(bool enable); |
| 415 | 415 |
| 416 protected: | 416 protected: |
| 417 // Expose increment/decrement of the in-flight event count, so |
| 418 // RenderViewHostImpl can account for in-flight beforeunload/unload events. |
| 419 int increment_in_flight_event_count() { return ++in_flight_event_count_; } |
| 420 int decrement_in_flight_event_count() { return --in_flight_event_count_; } |
| 421 |
| 417 // The View associated with the RenderViewHost. The lifetime of this object | 422 // The View associated with the RenderViewHost. The lifetime of this object |
| 418 // is associated with the lifetime of the Render process. If the Renderer | 423 // is associated with the lifetime of the Render process. If the Renderer |
| 419 // crashes, its View is destroyed and this pointer becomes NULL, even though | 424 // crashes, its View is destroyed and this pointer becomes NULL, even though |
| 420 // render_view_host_ lives on to load another URL (creating a new View while | 425 // render_view_host_ lives on to load another URL (creating a new View while |
| 421 // doing so). | 426 // doing so). |
| 422 RenderWidgetHostViewPort* view_; | 427 RenderWidgetHostViewPort* view_; |
| 423 | 428 |
| 424 // true if a renderer has once been valid. We use this flag to display a sad | 429 // true if a renderer has once been valid. We use this flag to display a sad |
| 425 // tab only when we lose our renderer and not if a paint occurs during | 430 // tab only when we lose our renderer and not if a paint occurs during |
| 426 // initialization. | 431 // initialization. |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 705 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 701 | 706 |
| 702 scoped_ptr<TapSuppressionController> tap_suppression_controller_; | 707 scoped_ptr<TapSuppressionController> tap_suppression_controller_; |
| 703 | 708 |
| 704 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 709 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 705 }; | 710 }; |
| 706 | 711 |
| 707 } // namespace content | 712 } // namespace content |
| 708 | 713 |
| 709 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 714 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |