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

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

Issue 17351006: MemoryPressure: sends the signal to the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/memory/memory_pressure_listener.h"
18 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
20 #include "base/observer_list.h" 21 #include "base/observer_list.h"
21 #include "base/process_util.h" 22 #include "base/process_util.h"
22 #include "base/strings/string16.h" 23 #include "base/strings/string16.h"
23 #include "base/time.h" 24 #include "base/time.h"
24 #include "base/timer.h" 25 #include "base/timer.h"
25 #include "build/build_config.h" 26 #include "build/build_config.h"
26 #include "content/browser/renderer_host/smooth_scroll_gesture_controller.h" 27 #include "content/browser/renderer_host/smooth_scroll_gesture_controller.h"
27 #include "content/common/browser_rendering_stats.h" 28 #include "content/common/browser_rendering_stats.h"
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 710
710 // Called on OnInputEventAck() to process a touch event ack message. 711 // Called on OnInputEventAck() to process a touch event ack message.
711 // This can result in a gesture event being generated and sent back to the 712 // This can result in a gesture event being generated and sent back to the
712 // renderer. 713 // renderer.
713 void ProcessTouchAck(InputEventAckState ack_result); 714 void ProcessTouchAck(InputEventAckState ack_result);
714 715
715 // Called when there is a new auto resize (using a post to avoid a stack 716 // Called when there is a new auto resize (using a post to avoid a stack
716 // which may get in recursive loops). 717 // which may get in recursive loops).
717 void DelayedAutoResized(); 718 void DelayedAutoResized();
718 719
720 // Sends a memory pressure signal to the renderer.
721 void SendMemoryPressureSignal(
722 base::MemoryPressureListener::MemoryPressureLevel level);
joth 2013/06/21 21:52:13 I think you want to do this at the RenderProcess,
719 723
720 // Our delegate, which wants to know mainly about keyboard events. 724 // Our delegate, which wants to know mainly about keyboard events.
721 // It will remain non-NULL until DetachDelegate() is called. 725 // It will remain non-NULL until DetachDelegate() is called.
722 RenderWidgetHostDelegate* delegate_; 726 RenderWidgetHostDelegate* delegate_;
723 727
724 // Created during construction but initialized during Init*(). Therefore, it 728 // Created during construction but initialized during Init*(). Therefore, it
725 // is guaranteed never to be NULL, but its channel may be NULL if the 729 // is guaranteed never to be NULL, but its channel may be NULL if the
726 // renderer crashed, so you must always check that. 730 // renderer crashed, so you must always check that.
727 RenderProcessHost* process_; 731 RenderProcessHost* process_;
728 732
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 std::list<HWND> dummy_windows_for_activation_; 933 std::list<HWND> dummy_windows_for_activation_;
930 #endif 934 #endif
931 935
932 // List of callbacks for pending snapshot requests to the renderer. 936 // List of callbacks for pending snapshot requests to the renderer.
933 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_; 937 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
934 938
935 int64 last_input_number_; 939 int64 last_input_number_;
936 940
937 BrowserRenderingStats rendering_stats_; 941 BrowserRenderingStats rendering_stats_;
938 942
943 base::MemoryPressureListener memory_pressure_listener_;
944
939 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 945 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
940 }; 946 };
941 947
942 } // namespace content 948 } // namespace content
943 949
944 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 950 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698