| OLD | NEW |
| 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 #include "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 | 1247 |
| 1248 #if defined(OS_MACOSX) | 1248 #if defined(OS_MACOSX) |
| 1249 // MacOS version of underlying GrabViewSnapshot() blocks while | 1249 // MacOS version of underlying GrabViewSnapshot() blocks while |
| 1250 // display/GPU are in a power-saving mode, so make sure display | 1250 // display/GPU are in a power-saving mode, so make sure display |
| 1251 // does not go to sleep for the duration of reading a snapshot. | 1251 // does not go to sleep for the duration of reading a snapshot. |
| 1252 if (pending_browser_snapshots_.empty()) { | 1252 if (pending_browser_snapshots_.empty()) { |
| 1253 DCHECK(!power_save_blocker_); | 1253 DCHECK(!power_save_blocker_); |
| 1254 power_save_blocker_.reset(new device::PowerSaveBlocker( | 1254 power_save_blocker_.reset(new device::PowerSaveBlocker( |
| 1255 device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, | 1255 device::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, |
| 1256 device::PowerSaveBlocker::kReasonOther, "GetSnapshot", | 1256 device::PowerSaveBlocker::kReasonOther, "GetSnapshot", |
| 1257 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 1257 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
| 1258 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))); | 1258 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE))); |
| 1259 } | 1259 } |
| 1260 #endif | 1260 #endif |
| 1261 pending_browser_snapshots_.insert(std::make_pair(id, callback)); | 1261 pending_browser_snapshots_.insert(std::make_pair(id, callback)); |
| 1262 Send(new ViewMsg_ForceRedraw(GetRoutingID(), id)); | 1262 Send(new ViewMsg_ForceRedraw(GetRoutingID(), id)); |
| 1263 } | 1263 } |
| 1264 | 1264 |
| 1265 const NativeWebKeyboardEvent* | 1265 const NativeWebKeyboardEvent* |
| 1266 RenderWidgetHostImpl::GetLastKeyboardEvent() const { | 1266 RenderWidgetHostImpl::GetLastKeyboardEvent() const { |
| 1267 return input_router_->GetLastKeyboardEvent(); | 1267 return input_router_->GetLastKeyboardEvent(); |
| 1268 } | 1268 } |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2154 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2154 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2155 } | 2155 } |
| 2156 | 2156 |
| 2157 BrowserAccessibilityManager* | 2157 BrowserAccessibilityManager* |
| 2158 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2158 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2159 return delegate_ ? | 2159 return delegate_ ? |
| 2160 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2160 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2161 } | 2161 } |
| 2162 | 2162 |
| 2163 } // namespace content | 2163 } // namespace content |
| OLD | NEW |