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_view_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
9 #include "content/browser/gpu/gpu_data_manager_impl.h" | 9 #include "content/browser/gpu/gpu_data_manager_impl.h" |
10 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.
h" | 10 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.
h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // The fix is to detach plugin windows from web contents when it is going | 371 // The fix is to detach plugin windows from web contents when it is going |
372 // away. This will prevent the plugin windows from getting destroyed | 372 // away. This will prevent the plugin windows from getting destroyed |
373 // automatically. The detached plugin windows will get cleaned up in proper | 373 // automatically. The detached plugin windows will get cleaned up in proper |
374 // sequence as part of the usual cleanup when the plugin instance goes away. | 374 // sequence as part of the usual cleanup when the plugin instance goes away. |
375 EnumChildWindows(parent, DetachPluginWindowsCallbackInternal, NULL); | 375 EnumChildWindows(parent, DetachPluginWindowsCallbackInternal, NULL); |
376 } | 376 } |
377 | 377 |
378 #endif // OS_WIN | 378 #endif // OS_WIN |
379 | 379 |
380 RenderWidgetHostViewBase::RenderWidgetHostViewBase() | 380 RenderWidgetHostViewBase::RenderWidgetHostViewBase() |
381 : popup_type_(WebKit::WebPopupTypeNone), | 381 : popup_type_(blink::WebPopupTypeNone), |
382 mouse_locked_(false), | 382 mouse_locked_(false), |
383 showing_context_menu_(false), | 383 showing_context_menu_(false), |
384 selection_text_offset_(0), | 384 selection_text_offset_(0), |
385 selection_range_(gfx::Range::InvalidRange()), | 385 selection_range_(gfx::Range::InvalidRange()), |
386 current_device_scale_factor_(0), | 386 current_device_scale_factor_(0), |
387 renderer_frame_number_(0) { | 387 renderer_frame_number_(0) { |
388 } | 388 } |
389 | 389 |
390 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() { | 390 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() { |
391 DCHECK(!mouse_locked_); | 391 DCHECK(!mouse_locked_); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 return selection_text_.substr( | 439 return selection_text_.substr( |
440 selection_range_.GetMin() - selection_text_offset_, | 440 selection_range_.GetMin() - selection_text_offset_, |
441 selection_range_.length()); | 441 selection_range_.length()); |
442 } | 442 } |
443 | 443 |
444 bool RenderWidgetHostViewBase::IsMouseLocked() { | 444 bool RenderWidgetHostViewBase::IsMouseLocked() { |
445 return mouse_locked_; | 445 return mouse_locked_; |
446 } | 446 } |
447 | 447 |
448 void RenderWidgetHostViewBase::UnhandledWheelEvent( | 448 void RenderWidgetHostViewBase::UnhandledWheelEvent( |
449 const WebKit::WebMouseWheelEvent& event) { | 449 const blink::WebMouseWheelEvent& event) { |
450 // Most implementations don't need to do anything here. | 450 // Most implementations don't need to do anything here. |
451 } | 451 } |
452 | 452 |
453 InputEventAckState RenderWidgetHostViewBase::FilterInputEvent( | 453 InputEventAckState RenderWidgetHostViewBase::FilterInputEvent( |
454 const WebKit::WebInputEvent& input_event) { | 454 const blink::WebInputEvent& input_event) { |
455 // By default, input events are simply forwarded to the renderer. | 455 // By default, input events are simply forwarded to the renderer. |
456 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 456 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
457 } | 457 } |
458 | 458 |
459 void RenderWidgetHostViewBase::OnDidFlushInput() { | 459 void RenderWidgetHostViewBase::OnDidFlushInput() { |
460 // The notification can safely be ignored by most implementations. | 460 // The notification can safely be ignored by most implementations. |
461 } | 461 } |
462 | 462 |
463 void RenderWidgetHostViewBase::OnSetNeedsFlushInput() { | 463 void RenderWidgetHostViewBase::OnSetNeedsFlushInput() { |
464 NOTIMPLEMENTED(); | 464 NOTIMPLEMENTED(); |
465 } | 465 } |
466 | 466 |
467 void RenderWidgetHostViewBase::GestureEventAck(int gesture_event_type, | 467 void RenderWidgetHostViewBase::GestureEventAck(int gesture_event_type, |
468 InputEventAckState ack_result) {} | 468 InputEventAckState ack_result) {} |
469 | 469 |
470 void RenderWidgetHostViewBase::SetPopupType(WebKit::WebPopupType popup_type) { | 470 void RenderWidgetHostViewBase::SetPopupType(blink::WebPopupType popup_type) { |
471 popup_type_ = popup_type; | 471 popup_type_ = popup_type; |
472 } | 472 } |
473 | 473 |
474 WebKit::WebPopupType RenderWidgetHostViewBase::GetPopupType() { | 474 blink::WebPopupType RenderWidgetHostViewBase::GetPopupType() { |
475 return popup_type_; | 475 return popup_type_; |
476 } | 476 } |
477 | 477 |
478 BrowserAccessibilityManager* | 478 BrowserAccessibilityManager* |
479 RenderWidgetHostViewBase::GetBrowserAccessibilityManager() const { | 479 RenderWidgetHostViewBase::GetBrowserAccessibilityManager() const { |
480 return browser_accessibility_manager_.get(); | 480 return browser_accessibility_manager_.get(); |
481 } | 481 } |
482 | 482 |
483 void RenderWidgetHostViewBase::SetBrowserAccessibilityManager( | 483 void RenderWidgetHostViewBase::SetBrowserAccessibilityManager( |
484 BrowserAccessibilityManager* manager) { | 484 BrowserAccessibilityManager* manager) { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 uint32 RenderWidgetHostViewBase::RendererFrameNumber() { | 572 uint32 RenderWidgetHostViewBase::RendererFrameNumber() { |
573 return renderer_frame_number_; | 573 return renderer_frame_number_; |
574 } | 574 } |
575 | 575 |
576 void RenderWidgetHostViewBase::DidReceiveRendererFrame() { | 576 void RenderWidgetHostViewBase::DidReceiveRendererFrame() { |
577 ++renderer_frame_number_; | 577 ++renderer_frame_number_; |
578 } | 578 } |
579 | 579 |
580 } // namespace content | 580 } // namespace content |
OLD | NEW |