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