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 | |
564 size_t in_flight_event_count() const { return in_flight_event_count_; } | 556 size_t in_flight_event_count() const { return in_flight_event_count_; } |
565 blink::WebInputEvent::Type hang_monitor_event_type() const { | 557 blink::WebInputEvent::Type hang_monitor_event_type() const { |
566 return hang_monitor_event_type_; | 558 return hang_monitor_event_type_; |
567 } | 559 } |
568 blink::WebInputEvent::Type last_event_type() const { | 560 blink::WebInputEvent::Type last_event_type() const { |
569 return last_event_type_; | 561 return last_event_type_; |
570 } | 562 } |
571 | 563 |
572 bool renderer_initialized() const { return renderer_initialized_; } | 564 bool renderer_initialized() const { return renderer_initialized_; } |
573 | 565 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 #endif | 903 #endif |
912 | 904 |
913 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 905 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
914 | 906 |
915 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 907 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
916 }; | 908 }; |
917 | 909 |
918 } // namespace content | 910 } // namespace content |
919 | 911 |
920 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 912 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |