OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/renderer/pepper/plugin_power_saver_helper.h" | 5 #include "content/renderer/pepper/plugin_power_saver_helper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram_macros.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "content/common/frame_messages.h" | 15 #include "content/common/frame_messages.h" |
16 #include "content/public/common/content_switches.h" | 16 #include "content/public/common/content_switches.h" |
17 #include "content/public/renderer/render_frame.h" | 17 #include "content/public/renderer/render_frame.h" |
18 #include "content/renderer/peripheral_content_heuristic.h" | 18 #include "content/renderer/peripheral_content_heuristic.h" |
19 #include "ppapi/shared_impl/ppapi_constants.h" | 19 #include "ppapi/shared_impl/ppapi_constants.h" |
20 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 20 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
21 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 void PluginPowerSaverHelper::WhitelistContentOrigin( | 125 void PluginPowerSaverHelper::WhitelistContentOrigin( |
126 const url::Origin& content_origin) { | 126 const url::Origin& content_origin) { |
127 if (origin_whitelist_.insert(content_origin).second) { | 127 if (origin_whitelist_.insert(content_origin).second) { |
128 Send(new FrameHostMsg_PluginContentOriginAllowed( | 128 Send(new FrameHostMsg_PluginContentOriginAllowed( |
129 render_frame()->GetRoutingID(), content_origin)); | 129 render_frame()->GetRoutingID(), content_origin)); |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 } // namespace content | 133 } // namespace content |
OLD | NEW |