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

Side by Side Diff: content/public/renderer/render_frame.h

Issue 2627513002: Plugin Power Saver: Refactor some Tiny plugin code and tests. (Closed)
Patch Set: Also update histograms.xml Created 3 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PUBLIC_RENDERER_RENDER_FRAME_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 struct WebPreferences; 59 struct WebPreferences;
60 60
61 // This interface wraps functionality, which is specific to frames, such as 61 // This interface wraps functionality, which is specific to frames, such as
62 // navigation. It provides communication with a corresponding RenderFrameHost 62 // navigation. It provides communication with a corresponding RenderFrameHost
63 // in the browser process. 63 // in the browser process.
64 class CONTENT_EXPORT RenderFrame : public IPC::Listener, 64 class CONTENT_EXPORT RenderFrame : public IPC::Listener,
65 public IPC::Sender { 65 public IPC::Sender {
66 public: 66 public:
67 // These numeric values are used in UMA logs; do not change them. 67 // These numeric values are used in UMA logs; do not change them.
68 enum PeripheralContentStatus { 68 enum PeripheralContentStatus {
69 // Content is peripheral because it doesn't meet any of the below criteria. 69 // Content is peripheral, and should be throttled, but is not tiny.
70 CONTENT_STATUS_PERIPHERAL = 0, 70 CONTENT_STATUS_PERIPHERAL = 0,
71 // Content is essential because it's same-origin with the top-level frame. 71 // Content is essential because it's same-origin with the top-level frame.
72 CONTENT_STATUS_ESSENTIAL_SAME_ORIGIN = 1, 72 CONTENT_STATUS_ESSENTIAL_SAME_ORIGIN = 1,
73 // Content is essential even though it's cross-origin, because it's large. 73 // Content is essential even though it's cross-origin, because it's large.
74 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_BIG = 2, 74 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_BIG = 2,
75 // Content is essential because there's large content from the same origin. 75 // Content is essential because there's large content from the same origin.
76 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED = 3, 76 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED = 3,
77 // Content is essential because it's tiny in size. 77 // Content is tiny in size. These are usually blocked.
78 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_TINY = 4, 78 CONTENT_STATUS_TINY = 4,
79 // Content is essential because it has an unknown size. 79 // Content has an unknown size.
80 CONTENT_STATUS_ESSENTIAL_UNKNOWN_SIZE = 5, 80 CONTENT_STATUS_UNKNOWN_SIZE = 5,
81 // Must be last. 81 // Must be last.
82 CONTENT_STATUS_NUM_ITEMS 82 CONTENT_STATUS_NUM_ITEMS
83 }; 83 };
84 84
85 enum RecordPeripheralDecision { 85 enum RecordPeripheralDecision {
86 DONT_RECORD_DECISION = 0, 86 DONT_RECORD_DECISION = 0,
87 RECORD_DECISION = 1 87 RECORD_DECISION = 1
88 }; 88 };
89 89
90 // Returns the RenderFrame given a WebFrame. 90 // Returns the RenderFrame given a WebFrame.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 private: 248 private:
249 // This interface should only be implemented inside content. 249 // This interface should only be implemented inside content.
250 friend class RenderFrameImpl; 250 friend class RenderFrameImpl;
251 RenderFrame() {} 251 RenderFrame() {}
252 }; 252 };
253 253
254 } // namespace content 254 } // namespace content
255 255
256 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ 256 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
OLDNEW
« no previous file with comments | « components/plugins/renderer/loadable_plugin_placeholder.cc ('k') | content/renderer/pepper/plugin_power_saver_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698