| 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_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 GetInputMethod()->CancelComposition(this); | 857 GetInputMethod()->CancelComposition(this); |
| 858 has_composition_text_ = false; | 858 has_composition_text_ = false; |
| 859 } | 859 } |
| 860 | 860 |
| 861 void RenderWidgetHostViewAura::ImeCompositionRangeChanged( | 861 void RenderWidgetHostViewAura::ImeCompositionRangeChanged( |
| 862 const gfx::Range& range, | 862 const gfx::Range& range, |
| 863 const std::vector<gfx::Rect>& character_bounds) { | 863 const std::vector<gfx::Rect>& character_bounds) { |
| 864 composition_character_bounds_ = character_bounds; | 864 composition_character_bounds_ = character_bounds; |
| 865 } | 865 } |
| 866 | 866 |
| 867 void RenderWidgetHostViewAura::RenderProcessGone(base::TerminationStatus status, | 867 void RenderWidgetHostViewAura::Destroy() { |
| 868 int error_code) { | |
| 869 UpdateCursorIfOverSelf(); | 868 UpdateCursorIfOverSelf(); |
| 870 Destroy(); | |
| 871 } | |
| 872 | |
| 873 void RenderWidgetHostViewAura::Destroy() { | |
| 874 // Beware, this function is not called on all destruction paths. It will | 869 // Beware, this function is not called on all destruction paths. It will |
| 875 // implicitly end up calling ~RenderWidgetHostViewAura though, so all | 870 // implicitly end up calling ~RenderWidgetHostViewAura though, so all |
| 876 // destruction/cleanup code should happen there, not here. | 871 // destruction/cleanup code should happen there, not here. |
| 877 in_shutdown_ = true; | 872 in_shutdown_ = true; |
| 878 delete window_; | 873 delete window_; |
| 879 } | 874 } |
| 880 | 875 |
| 881 void RenderWidgetHostViewAura::SetTooltipText( | 876 void RenderWidgetHostViewAura::SetTooltipText( |
| 882 const base::string16& tooltip_text) { | 877 const base::string16& tooltip_text) { |
| 883 tooltip_ = tooltip_text; | 878 tooltip_ = tooltip_text; |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 // to the input method). | 1667 // to the input method). |
| 1673 ui::InputMethod* input_method = GetInputMethod(); | 1668 ui::InputMethod* input_method = GetInputMethod(); |
| 1674 if (input_method) | 1669 if (input_method) |
| 1675 input_method->DetachTextInputClient(this); | 1670 input_method->DetachTextInputClient(this); |
| 1676 | 1671 |
| 1677 if (overscroll_controller_) | 1672 if (overscroll_controller_) |
| 1678 overscroll_controller_->Reset(); | 1673 overscroll_controller_->Reset(); |
| 1679 } | 1674 } |
| 1680 | 1675 |
| 1681 void RenderWidgetHostViewAura::OnWindowDestroyed(aura::Window* window) { | 1676 void RenderWidgetHostViewAura::OnWindowDestroyed(aura::Window* window) { |
| 1682 host_->ViewDestroyed(); | |
| 1683 delete this; | 1677 delete this; |
| 1684 } | 1678 } |
| 1685 | 1679 |
| 1686 void RenderWidgetHostViewAura::OnWindowTargetVisibilityChanged(bool visible) { | 1680 void RenderWidgetHostViewAura::OnWindowTargetVisibilityChanged(bool visible) { |
| 1687 } | 1681 } |
| 1688 | 1682 |
| 1689 bool RenderWidgetHostViewAura::HasHitTestMask() const { | 1683 bool RenderWidgetHostViewAura::HasHitTestMask() const { |
| 1690 return false; | 1684 return false; |
| 1691 } | 1685 } |
| 1692 | 1686 |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 TRACE_EVENT1("ui", "RenderWidgetHostViewAura::OnHostMoved", | 2115 TRACE_EVENT1("ui", "RenderWidgetHostViewAura::OnHostMoved", |
| 2122 "new_origin", new_origin.ToString()); | 2116 "new_origin", new_origin.ToString()); |
| 2123 | 2117 |
| 2124 UpdateScreenInfo(window_); | 2118 UpdateScreenInfo(window_); |
| 2125 } | 2119 } |
| 2126 | 2120 |
| 2127 //////////////////////////////////////////////////////////////////////////////// | 2121 //////////////////////////////////////////////////////////////////////////////// |
| 2128 // RenderWidgetHostViewAura, private: | 2122 // RenderWidgetHostViewAura, private: |
| 2129 | 2123 |
| 2130 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() { | 2124 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() { |
| 2125 host_->ViewDestroyed(this); |
| 2126 |
| 2131 if (touch_editing_client_) | 2127 if (touch_editing_client_) |
| 2132 touch_editing_client_->OnViewDestroyed(); | 2128 touch_editing_client_->OnViewDestroyed(); |
| 2133 | 2129 |
| 2134 delegated_frame_host_.reset(); | 2130 delegated_frame_host_.reset(); |
| 2135 window_observer_.reset(); | 2131 window_observer_.reset(); |
| 2136 if (window_->GetHost()) | 2132 if (window_->GetHost()) |
| 2137 window_->GetHost()->RemoveObserver(this); | 2133 window_->GetHost()->RemoveObserver(this); |
| 2138 UnlockMouse(); | 2134 UnlockMouse(); |
| 2139 if (popup_parent_host_view_) { | 2135 if (popup_parent_host_view_) { |
| 2140 DCHECK(popup_parent_host_view_->popup_child_host_view_ == NULL || | 2136 DCHECK(popup_parent_host_view_->popup_child_host_view_ == NULL || |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2494 | 2490 |
| 2495 //////////////////////////////////////////////////////////////////////////////// | 2491 //////////////////////////////////////////////////////////////////////////////// |
| 2496 // RenderWidgetHostViewBase, public: | 2492 // RenderWidgetHostViewBase, public: |
| 2497 | 2493 |
| 2498 // static | 2494 // static |
| 2499 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2495 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2500 GetScreenInfoForWindow(results, NULL); | 2496 GetScreenInfoForWindow(results, NULL); |
| 2501 } | 2497 } |
| 2502 | 2498 |
| 2503 } // namespace content | 2499 } // namespace content |
| OLD | NEW |