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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "content/public/common/result_codes.h" | 69 #include "content/public/common/result_codes.h" |
70 #include "content/public/common/web_preferences.h" | 70 #include "content/public/common/web_preferences.h" |
71 #include "gpu/GLES2/gl2extchromium.h" | 71 #include "gpu/GLES2/gl2extchromium.h" |
72 #include "gpu/command_buffer/service/gpu_switches.h" | 72 #include "gpu/command_buffer/service/gpu_switches.h" |
73 #include "gpu/ipc/common/gpu_messages.h" | 73 #include "gpu/ipc/common/gpu_messages.h" |
74 #include "skia/ext/image_operations.h" | 74 #include "skia/ext/image_operations.h" |
75 #include "skia/ext/platform_canvas.h" | 75 #include "skia/ext/platform_canvas.h" |
76 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 76 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
77 #include "ui/events/event.h" | 77 #include "ui/events/event.h" |
78 #include "ui/events/keycodes/keyboard_codes.h" | 78 #include "ui/events/keycodes/keyboard_codes.h" |
79 #include "ui/gfx/color_profile.h" | 79 #include "ui/gfx/color_space.h" |
80 #include "ui/gfx/geometry/size_conversions.h" | 80 #include "ui/gfx/geometry/size_conversions.h" |
81 #include "ui/gfx/geometry/vector2d_conversions.h" | 81 #include "ui/gfx/geometry/vector2d_conversions.h" |
82 #include "ui/gfx/skbitmap_operations.h" | 82 #include "ui/gfx/skbitmap_operations.h" |
83 #include "ui/snapshot/snapshot.h" | 83 #include "ui/snapshot/snapshot.h" |
84 | 84 |
85 #if defined(OS_MACOSX) | 85 #if defined(OS_MACOSX) |
86 #include "device/power_save_blocker/power_save_blocker.h" | 86 #include "device/power_save_blocker/power_save_blocker.h" |
87 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" | 87 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
88 #endif | 88 #endif |
89 | 89 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)), | 214 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)), |
215 new_content_rendering_delay_( | 215 new_content_rendering_delay_( |
216 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)), | 216 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)), |
217 weak_factory_(this) { | 217 weak_factory_(this) { |
218 CHECK(delegate_); | 218 CHECK(delegate_); |
219 CHECK_NE(MSG_ROUTING_NONE, routing_id_); | 219 CHECK_NE(MSG_ROUTING_NONE, routing_id_); |
220 | 220 |
221 #if defined(OS_WIN) | 221 #if defined(OS_WIN) |
222 // Update the display color profile cache so that it is likely to be up to | 222 // Update the display color profile cache so that it is likely to be up to |
223 // date when the renderer process requests the color profile. | 223 // date when the renderer process requests the color profile. |
224 if (gfx::ColorProfile::CachedProfilesNeedUpdate()) { | 224 if (gfx::ColorSpace::CachedProfilesNeedUpdate()) { |
225 BrowserThread::PostBlockingPoolTask( | 225 BrowserThread::PostBlockingPoolTask( |
226 FROM_HERE, | 226 FROM_HERE, |
227 base::Bind(&gfx::ColorProfile::UpdateCachedProfilesOnBackgroundThread)); | 227 base::Bind(&gfx::ColorSpace::UpdateCachedProfilesOnBackgroundThread)); |
228 } | 228 } |
229 #endif | 229 #endif |
230 | 230 |
231 std::pair<RoutingIDWidgetMap::iterator, bool> result = | 231 std::pair<RoutingIDWidgetMap::iterator, bool> result = |
232 g_routing_id_widget_map.Get().insert(std::make_pair( | 232 g_routing_id_widget_map.Get().insert(std::make_pair( |
233 RenderWidgetHostID(process->GetID(), routing_id_), this)); | 233 RenderWidgetHostID(process->GetID(), routing_id_), this)); |
234 CHECK(result.second) << "Inserting a duplicate item!"; | 234 CHECK(result.second) << "Inserting a duplicate item!"; |
235 process_->AddRoute(routing_id_, this); | 235 process_->AddRoute(routing_id_, this); |
236 | 236 |
237 // If we're initially visible, tell the process host that we're alive. | 237 // If we're initially visible, tell the process host that we're alive. |
(...skipping 1916 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 |