OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 has_focus_(false), | 80 has_focus_(false), |
81 handling_input_event_(false), | 81 handling_input_event_(false), |
82 closing_(false), | 82 closing_(false), |
83 is_swapped_out_(false), | 83 is_swapped_out_(false), |
84 input_method_is_active_(false), | 84 input_method_is_active_(false), |
85 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), | 85 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), |
86 can_compose_inline_(true), | 86 can_compose_inline_(true), |
87 popup_type_(popup_type), | 87 popup_type_(popup_type), |
88 pending_window_rect_count_(0), | 88 pending_window_rect_count_(0), |
89 suppress_next_char_events_(false), | 89 suppress_next_char_events_(false), |
| 90 page_scale_factor_set_(false), |
90 is_accelerated_compositing_active_(false), | 91 is_accelerated_compositing_active_(false), |
91 animation_update_pending_(false), | 92 animation_update_pending_(false), |
92 animation_task_posted_(false), | 93 animation_task_posted_(false), |
93 invalidation_task_posted_(false) { | 94 invalidation_task_posted_(false) { |
94 RenderProcess::current()->AddRefProcess(); | 95 RenderProcess::current()->AddRefProcess(); |
95 DCHECK(render_thread_); | 96 DCHECK(render_thread_); |
96 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( | 97 has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( |
97 switches::kDisableGpuVsync); | 98 switches::kDisableGpuVsync); |
98 } | 99 } |
99 | 100 |
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 | 1237 |
1237 webkit::ppapi::PluginInstance* RenderWidget::GetBitmapForOptimizedPluginPaint( | 1238 webkit::ppapi::PluginInstance* RenderWidget::GetBitmapForOptimizedPluginPaint( |
1238 const gfx::Rect& paint_bounds, | 1239 const gfx::Rect& paint_bounds, |
1239 TransportDIB** dib, | 1240 TransportDIB** dib, |
1240 gfx::Rect* location, | 1241 gfx::Rect* location, |
1241 gfx::Rect* clip) { | 1242 gfx::Rect* clip) { |
1242 // Bare RenderWidgets don't support optimized plugin painting. | 1243 // Bare RenderWidgets don't support optimized plugin painting. |
1243 return NULL; | 1244 return NULL; |
1244 } | 1245 } |
1245 | 1246 |
| 1247 gfx::Size RenderWidget::GetContentSize() { |
| 1248 // Bare RenderWidgets don't support content size. |
| 1249 return gfx::Size(0, 0); |
| 1250 } |
| 1251 |
| 1252 float RenderWidget::GetPageScaleFactor() { |
| 1253 // Bare RenderWidgets don't support page scale factor. |
| 1254 return 1.0f; |
| 1255 } |
| 1256 |
1246 gfx::Point RenderWidget::GetScrollOffset() { | 1257 gfx::Point RenderWidget::GetScrollOffset() { |
1247 // Bare RenderWidgets don't support scroll offset. | 1258 // Bare RenderWidgets don't support scroll offset. |
1248 return gfx::Point(0, 0); | 1259 return gfx::Point(0, 0); |
1249 } | 1260 } |
1250 | 1261 |
1251 void RenderWidget::SetHidden(bool hidden) { | 1262 void RenderWidget::SetHidden(bool hidden) { |
1252 if (is_hidden_ == hidden) | 1263 if (is_hidden_ == hidden) |
1253 return; | 1264 return; |
1254 | 1265 |
1255 // The status has changed. Tell the RenderThread about it. | 1266 // The status has changed. Tell the RenderThread about it. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 | 1402 |
1392 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1403 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
1393 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1404 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
1394 i != plugin_window_moves_.end(); ++i) { | 1405 i != plugin_window_moves_.end(); ++i) { |
1395 if (i->window == window) { | 1406 if (i->window == window) { |
1396 plugin_window_moves_.erase(i); | 1407 plugin_window_moves_.erase(i); |
1397 break; | 1408 break; |
1398 } | 1409 } |
1399 } | 1410 } |
1400 } | 1411 } |
OLD | NEW |