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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 // Called when we receive a notification indicating that the renderer process | 546 // Called when we receive a notification indicating that the renderer process |
547 // is gone. This will reset our state so that our state will be consistent if | 547 // is gone. This will reset our state so that our state will be consistent if |
548 // a new renderer is created. | 548 // a new renderer is created. |
549 void RendererExited(base::TerminationStatus status, int exit_code); | 549 void RendererExited(base::TerminationStatus status, int exit_code); |
550 | 550 |
551 // Called from a RenderFrameHost when the text selection has changed. | 551 // Called from a RenderFrameHost when the text selection has changed. |
552 void SelectionChanged(const base::string16& text, | 552 void SelectionChanged(const base::string16& text, |
553 uint32_t offset, | 553 uint32_t offset, |
554 const gfx::Range& range); | 554 const gfx::Range& range); |
555 | 555 |
| 556 // Expose increment/decrement of the in-flight event count, so |
| 557 // RenderViewHostImpl can account for in-flight beforeunload/unload events. |
| 558 int increment_in_flight_event_count() { return ++in_flight_event_count_; } |
| 559 int decrement_in_flight_event_count() { |
| 560 DCHECK_GT(in_flight_event_count_, 0); |
| 561 return --in_flight_event_count_; |
| 562 } |
| 563 |
556 size_t in_flight_event_count() const { return in_flight_event_count_; } | 564 size_t in_flight_event_count() const { return in_flight_event_count_; } |
557 blink::WebInputEvent::Type hang_monitor_event_type() const { | 565 blink::WebInputEvent::Type hang_monitor_event_type() const { |
558 return hang_monitor_event_type_; | 566 return hang_monitor_event_type_; |
559 } | 567 } |
560 blink::WebInputEvent::Type last_event_type() const { | 568 blink::WebInputEvent::Type last_event_type() const { |
561 return last_event_type_; | 569 return last_event_type_; |
562 } | 570 } |
563 | 571 |
564 bool renderer_initialized() const { return renderer_initialized_; } | 572 bool renderer_initialized() const { return renderer_initialized_; } |
565 | 573 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 #endif | 911 #endif |
904 | 912 |
905 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 913 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
906 | 914 |
907 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 915 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
908 }; | 916 }; |
909 | 917 |
910 } // namespace content | 918 } // namespace content |
911 | 919 |
912 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 920 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |