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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 // Called when we receive a notification indicating that the renderer process | 539 // Called when we receive a notification indicating that the renderer process |
540 // is gone. This will reset our state so that our state will be consistent if | 540 // is gone. This will reset our state so that our state will be consistent if |
541 // a new renderer is created. | 541 // a new renderer is created. |
542 void RendererExited(base::TerminationStatus status, int exit_code); | 542 void RendererExited(base::TerminationStatus status, int exit_code); |
543 | 543 |
544 // Called from a RenderFrameHost when the text selection has changed. | 544 // Called from a RenderFrameHost when the text selection has changed. |
545 void SelectionChanged(const base::string16& text, | 545 void SelectionChanged(const base::string16& text, |
546 uint32_t offset, | 546 uint32_t offset, |
547 const gfx::Range& range); | 547 const gfx::Range& range); |
548 | 548 |
549 // Expose increment/decrement of the in-flight event count, so | |
550 // RenderViewHostImpl can account for in-flight beforeunload/unload events. | |
551 int increment_in_flight_event_count() { return ++in_flight_event_count_; } | |
552 int decrement_in_flight_event_count() { | |
553 DCHECK_GT(in_flight_event_count_, 0); | |
554 return --in_flight_event_count_; | |
555 } | |
556 | |
557 size_t in_flight_event_count() const { return in_flight_event_count_; } | 549 size_t in_flight_event_count() const { return in_flight_event_count_; } |
558 blink::WebInputEvent::Type hang_monitor_event_type() const { | 550 blink::WebInputEvent::Type hang_monitor_event_type() const { |
559 return hang_monitor_event_type_; | 551 return hang_monitor_event_type_; |
560 } | 552 } |
561 blink::WebInputEvent::Type last_event_type() const { | 553 blink::WebInputEvent::Type last_event_type() const { |
562 return last_event_type_; | 554 return last_event_type_; |
563 } | 555 } |
564 | 556 |
565 bool renderer_initialized() const { return renderer_initialized_; } | 557 bool renderer_initialized() const { return renderer_initialized_; } |
566 | 558 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 #endif | 886 #endif |
895 | 887 |
896 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 888 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
897 | 889 |
898 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 890 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
899 }; | 891 }; |
900 | 892 |
901 } // namespace content | 893 } // namespace content |
902 | 894 |
903 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 895 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |