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

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

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

Powered by Google App Engine
This is Rietveld 408576698