| 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/renderer/render_view_impl.h" |     5 #include "content/renderer/render_view_impl.h" | 
|     6  |     6  | 
|     7 #include <algorithm> |     7 #include <algorithm> | 
|     8 #include <cmath> |     8 #include <cmath> | 
|     9  |     9  | 
|    10 #include "base/auto_reset.h" |    10 #include "base/auto_reset.h" | 
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   910 #endif  // defined(OS_MACOSX) |   910 #endif  // defined(OS_MACOSX) | 
|   911  |   911  | 
|   912 #if defined(OS_ANDROID) |   912 #if defined(OS_ANDROID) | 
|   913   media_player_manager_.reset(new WebMediaPlayerManagerAndroid()); |   913   media_player_manager_.reset(new WebMediaPlayerManagerAndroid()); | 
|   914 #endif |   914 #endif | 
|   915  |   915  | 
|   916   // The next group of objects all implement RenderViewObserver, so are deleted |   916   // The next group of objects all implement RenderViewObserver, so are deleted | 
|   917   // along with the RenderView automatically. |   917   // along with the RenderView automatically. | 
|   918   devtools_agent_ = new DevToolsAgent(this); |   918   devtools_agent_ = new DevToolsAgent(this); | 
|   919   mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); |   919   mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); | 
|   920  |   920   if (RenderWidgetCompositor* rwc = compositor()) { | 
 |   921     webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); | 
 |   922   } | 
|   921   new ImageLoadingHelper(this); |   923   new ImageLoadingHelper(this); | 
|   922  |   924  | 
|   923   // Create renderer_accessibility_ if needed. |   925   // Create renderer_accessibility_ if needed. | 
|   924   OnSetAccessibilityMode(params->accessibility_mode); |   926   OnSetAccessibilityMode(params->accessibility_mode); | 
|   925  |   927  | 
|   926   new IdleUserDetector(this); |   928   new IdleUserDetector(this); | 
|   927  |   929  | 
|   928   if (command_line.HasSwitch(switches::kDomAutomationController)) |   930   if (command_line.HasSwitch(switches::kDomAutomationController)) | 
|   929     enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; |   931     enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; | 
|   930   if (command_line.HasSwitch(switches::kStatsCollectionController)) |   932   if (command_line.HasSwitch(switches::kStatsCollectionController)) | 
| (...skipping 5393 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6324     return; |  6326     return; | 
|  6325   if (!webview()->devToolsAgent()) |  6327   if (!webview()->devToolsAgent()) | 
|  6326     return; |  6328     return; | 
|  6327   webview()->devToolsAgent()->willComposite(); |  6329   webview()->devToolsAgent()->willComposite(); | 
|  6328 } |  6330 } | 
|  6329  |  6331  | 
|  6330 bool RenderViewImpl::AllowPartialSwap() const { |  6332 bool RenderViewImpl::AllowPartialSwap() const { | 
|  6331   return allow_partial_swap_; |  6333   return allow_partial_swap_; | 
|  6332 } |  6334 } | 
|  6333  |  6335  | 
 |  6336 void RenderViewImpl::initializeLayerTreeView() { | 
 |  6337   RenderWidget::initializeLayerTreeView(); | 
 |  6338   RenderWidgetCompositor* rwc = compositor(); | 
 |  6339   if (!rwc || !webview() || !webview()->devToolsAgent()) | 
 |  6340     return; | 
 |  6341   webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); | 
 |  6342 } | 
 |  6343  | 
|  6334 #if defined(OS_WIN) |  6344 #if defined(OS_WIN) | 
|  6335 void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) { |  6345 void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) { | 
|  6336   if (focused) |  6346   if (focused) | 
|  6337     focused_plugin_id_ = plugin_id; |  6347     focused_plugin_id_ = plugin_id; | 
|  6338   else |  6348   else | 
|  6339     focused_plugin_id_ = -1; |  6349     focused_plugin_id_ = -1; | 
|  6340 } |  6350 } | 
|  6341 #endif |  6351 #endif | 
|  6342  |  6352  | 
|  6343 #if defined(OS_MACOSX) |  6353 #if defined(OS_MACOSX) | 
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6765     WebURL url = icon_urls[i].iconURL(); |  6775     WebURL url = icon_urls[i].iconURL(); | 
|  6766     if (!url.isEmpty()) |  6776     if (!url.isEmpty()) | 
|  6767       urls.push_back(FaviconURL(url, |  6777       urls.push_back(FaviconURL(url, | 
|  6768                                 ToFaviconType(icon_urls[i].iconType()))); |  6778                                 ToFaviconType(icon_urls[i].iconType()))); | 
|  6769   } |  6779   } | 
|  6770   SendUpdateFaviconURL(urls); |  6780   SendUpdateFaviconURL(urls); | 
|  6771 } |  6781 } | 
|  6772  |  6782  | 
|  6773  |  6783  | 
|  6774 }  // namespace content |  6784 }  // namespace content | 
| OLD | NEW |