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/logging.h" | 10 #include "base/logging.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 top_controls_shrink_blink_size_(false), | 488 top_controls_shrink_blink_size_(false), |
489 top_controls_height_(0.f), | 489 top_controls_height_(0.f), |
490 next_paint_flags_(0), | 490 next_paint_flags_(0), |
491 auto_resize_mode_(false), | 491 auto_resize_mode_(false), |
492 need_update_rect_for_auto_resize_(false), | 492 need_update_rect_for_auto_resize_(false), |
493 did_show_(false), | 493 did_show_(false), |
494 is_hidden_(hidden), | 494 is_hidden_(hidden), |
495 compositor_never_visible_(never_visible), | 495 compositor_never_visible_(never_visible), |
496 is_fullscreen_granted_(false), | 496 is_fullscreen_granted_(false), |
497 display_mode_(blink::WebDisplayModeUndefined), | 497 display_mode_(blink::WebDisplayModeUndefined), |
498 has_focus_(false), | |
499 handling_input_event_(false), | 498 handling_input_event_(false), |
500 handling_event_overscroll_(nullptr), | 499 handling_event_overscroll_(nullptr), |
501 handling_ime_event_(false), | 500 handling_ime_event_(false), |
502 handling_event_type_(WebInputEvent::Undefined), | 501 handling_event_type_(WebInputEvent::Undefined), |
503 ignore_ack_for_mouse_move_from_debugger_(false), | 502 ignore_ack_for_mouse_move_from_debugger_(false), |
504 closing_(false), | 503 closing_(false), |
505 host_closing_(false), | 504 host_closing_(false), |
506 is_swapped_out_(swapped_out), | 505 is_swapped_out_(swapped_out), |
507 for_oopif_(false), | 506 for_oopif_(false), |
508 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), | 507 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 if (webwidget_) | 1286 if (webwidget_) |
1288 webwidget_->setCursorVisibilityState(is_visible); | 1287 webwidget_->setCursorVisibilityState(is_visible); |
1289 } | 1288 } |
1290 | 1289 |
1291 void RenderWidget::OnMouseCaptureLost() { | 1290 void RenderWidget::OnMouseCaptureLost() { |
1292 if (webwidget_) | 1291 if (webwidget_) |
1293 webwidget_->mouseCaptureLost(); | 1292 webwidget_->mouseCaptureLost(); |
1294 } | 1293 } |
1295 | 1294 |
1296 void RenderWidget::OnSetFocus(bool enable) { | 1295 void RenderWidget::OnSetFocus(bool enable) { |
1297 has_focus_ = enable; | |
1298 if (webwidget_) | 1296 if (webwidget_) |
1299 webwidget_->setFocus(enable); | 1297 webwidget_->setFocus(enable); |
1300 } | 1298 } |
1301 | 1299 |
1302 void RenderWidget::FlushPendingInputEventAck() { | 1300 void RenderWidget::FlushPendingInputEventAck() { |
1303 if (pending_input_event_ack_) { | 1301 if (pending_input_event_ack_) { |
1304 TRACE_EVENT_ASYNC_END0("input", "RenderWidget::ThrottledInputEventAck", | 1302 TRACE_EVENT_ASYNC_END0("input", "RenderWidget::ThrottledInputEventAck", |
1305 pending_input_event_ack_.get()); | 1303 pending_input_event_ack_.get()); |
1306 Send(pending_input_event_ack_.release()); | 1304 Send(pending_input_event_ack_.release()); |
1307 } | 1305 } |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2387 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2385 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2388 video_hole_frames_.AddObserver(frame); | 2386 video_hole_frames_.AddObserver(frame); |
2389 } | 2387 } |
2390 | 2388 |
2391 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2389 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2392 video_hole_frames_.RemoveObserver(frame); | 2390 video_hole_frames_.RemoveObserver(frame); |
2393 } | 2391 } |
2394 #endif // defined(VIDEO_HOLE) | 2392 #endif // defined(VIDEO_HOLE) |
2395 | 2393 |
2396 } // namespace content | 2394 } // namespace content |
OLD | NEW |