Chromium Code Reviews| 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_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 outstanding_ime_acks_(0), | 396 outstanding_ime_acks_(0), |
| 397 body_background_color_(SK_ColorWHITE), | 397 body_background_color_(SK_ColorWHITE), |
| 398 #endif | 398 #endif |
| 399 popup_origin_scale_for_emulation_(0.f), | 399 popup_origin_scale_for_emulation_(0.f), |
| 400 resizing_mode_selector_(new ResizingModeSelector()), | 400 resizing_mode_selector_(new ResizingModeSelector()), |
| 401 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) { | 401 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) { |
| 402 if (!swapped_out) | 402 if (!swapped_out) |
| 403 RenderProcess::current()->AddRefProcess(); | 403 RenderProcess::current()->AddRefProcess(); |
| 404 DCHECK(RenderThread::Get()); | 404 DCHECK(RenderThread::Get()); |
| 405 is_threaded_compositing_enabled_ = | 405 is_threaded_compositing_enabled_ = |
| 406 CommandLine::ForCurrentProcess()->HasSwitch( | 406 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 407 switches::kEnableThreadedCompositing); | 407 switches::kDisableThreadedCompositing); |
|
piman
2014/06/13 20:55:19
nit: can we test from !!RenderThreadImpl::Get()->c
danakj
2014/06/13 21:46:35
Done.
| |
| 408 } | 408 } |
| 409 | 409 |
| 410 RenderWidget::~RenderWidget() { | 410 RenderWidget::~RenderWidget() { |
| 411 DCHECK(!webwidget_) << "Leaking our WebWidget!"; | 411 DCHECK(!webwidget_) << "Leaking our WebWidget!"; |
| 412 | 412 |
| 413 // If we are swapped out, we have released already. | 413 // If we are swapped out, we have released already. |
| 414 if (!is_swapped_out_ && RenderProcess::current()) | 414 if (!is_swapped_out_ && RenderProcess::current()) |
| 415 RenderProcess::current()->ReleaseProcess(); | 415 RenderProcess::current()->ReleaseProcess(); |
| 416 } | 416 } |
| 417 | 417 |
| (...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2070 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2070 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2071 video_hole_frames_.AddObserver(frame); | 2071 video_hole_frames_.AddObserver(frame); |
| 2072 } | 2072 } |
| 2073 | 2073 |
| 2074 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2074 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2075 video_hole_frames_.RemoveObserver(frame); | 2075 video_hole_frames_.RemoveObserver(frame); |
| 2076 } | 2076 } |
| 2077 #endif // defined(VIDEO_HOLE) | 2077 #endif // defined(VIDEO_HOLE) |
| 2078 | 2078 |
| 2079 } // namespace content | 2079 } // namespace content |
| OLD | NEW |