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

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: timeout values 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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698