Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2727253005: Move beforeunload hang timer duties to its own timer. (Closed)
Patch Set: rev Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // Called when we receive a notification indicating that the renderer process 541 // Called when we receive a notification indicating that the renderer process
542 // is gone. This will reset our state so that our state will be consistent if 542 // is gone. This will reset our state so that our state will be consistent if
543 // a new renderer is created. 543 // a new renderer is created.
544 void RendererExited(base::TerminationStatus status, int exit_code); 544 void RendererExited(base::TerminationStatus status, int exit_code);
545 545
546 // Called from a RenderFrameHost when the text selection has changed. 546 // Called from a RenderFrameHost when the text selection has changed.
547 void SelectionChanged(const base::string16& text, 547 void SelectionChanged(const base::string16& text,
548 uint32_t offset, 548 uint32_t offset,
549 const gfx::Range& range); 549 const gfx::Range& range);
550 550
551 // Expose increment/decrement of the in-flight event count, so
552 // RenderViewHostImpl can account for in-flight beforeunload/unload events.
Charlie Reis 2017/03/06 21:10:44 Yay!
Avi (use Gerrit) 2017/03/06 22:11:17 Acknowledged.
553 int increment_in_flight_event_count() { return ++in_flight_event_count_; }
554 int decrement_in_flight_event_count() {
555 DCHECK_GT(in_flight_event_count_, 0);
556 return --in_flight_event_count_;
557 }
558
559 size_t in_flight_event_count() const { return in_flight_event_count_; } 551 size_t in_flight_event_count() const { return in_flight_event_count_; }
560 blink::WebInputEvent::Type hang_monitor_event_type() const { 552 blink::WebInputEvent::Type hang_monitor_event_type() const {
561 return hang_monitor_event_type_; 553 return hang_monitor_event_type_;
562 } 554 }
563 blink::WebInputEvent::Type last_event_type() const { 555 blink::WebInputEvent::Type last_event_type() const {
564 return last_event_type_; 556 return last_event_type_;
565 } 557 }
566 558
567 bool renderer_initialized() const { return renderer_initialized_; } 559 bool renderer_initialized() const { return renderer_initialized_; }
568 560
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 #endif 896 #endif
905 897
906 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 898 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
907 899
908 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 900 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
909 }; 901 };
910 902
911 } // namespace content 903 } // namespace content
912 904
913 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 905 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698