| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_mus.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mus.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "components/mus/public/cpp/window.h" | 10 #include "components/mus/public/cpp/window.h" |
| 11 #include "components/mus/public/cpp/window_tree_connection.h" | 11 #include "components/mus/public/cpp/window_tree_connection.h" |
| 12 #include "content/browser/mojo/mojo_child_connection.h" | 12 #include "content/browser/mojo/mojo_child_connection.h" |
| 13 #include "content/browser/renderer_host/render_process_host_impl.h" | 13 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 14 #include "content/browser/renderer_host/render_widget_host_impl.h" | 14 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 15 #include "content/common/render_widget_window_tree_client_factory.mojom.h" | 15 #include "content/common/render_widget_window_tree_client_factory.mojom.h" |
| 16 #include "content/common/text_input_state.h" | |
| 17 #include "content/public/common/mojo_shell_connection.h" | 16 #include "content/public/common/mojo_shell_connection.h" |
| 18 #include "mojo/shell/public/cpp/connector.h" | 17 #include "mojo/shell/public/cpp/connector.h" |
| 19 #include "ui/aura/client/screen_position_client.h" | 18 #include "ui/aura/client/screen_position_client.h" |
| 20 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
| 21 #include "ui/base/hit_test.h" | 20 #include "ui/base/hit_test.h" |
| 22 | 21 |
| 23 namespace blink { | 22 namespace blink { |
| 24 struct WebScreenInfo; | 23 struct WebScreenInfo; |
| 25 } | 24 } |
| 26 | 25 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 gfx::Vector2dF RenderWidgetHostViewMus::GetLastScrollOffset() const { | 117 gfx::Vector2dF RenderWidgetHostViewMus::GetLastScrollOffset() const { |
| 119 return gfx::Vector2dF(); | 118 return gfx::Vector2dF(); |
| 120 } | 119 } |
| 121 | 120 |
| 122 void RenderWidgetHostViewMus::RenderProcessGone(base::TerminationStatus status, | 121 void RenderWidgetHostViewMus::RenderProcessGone(base::TerminationStatus status, |
| 123 int error_code) { | 122 int error_code) { |
| 124 NOTIMPLEMENTED(); | 123 NOTIMPLEMENTED(); |
| 125 } | 124 } |
| 126 | 125 |
| 127 void RenderWidgetHostViewMus::Destroy() { | 126 void RenderWidgetHostViewMus::Destroy() { |
| 128 // The WebContentsImpl should be notified about us so that it will not hold | |
| 129 // an invalid text input state which was due to active text on this view. | |
| 130 NotifyHostDelegateAboutShutdown(); | |
| 131 | |
| 132 delete aura_window_; | 127 delete aura_window_; |
| 133 } | 128 } |
| 134 | 129 |
| 135 gfx::Size RenderWidgetHostViewMus::GetPhysicalBackingSize() const { | 130 gfx::Size RenderWidgetHostViewMus::GetPhysicalBackingSize() const { |
| 136 return RenderWidgetHostViewBase::GetPhysicalBackingSize(); | 131 return RenderWidgetHostViewBase::GetPhysicalBackingSize(); |
| 137 } | 132 } |
| 138 | 133 |
| 139 base::string16 RenderWidgetHostViewMus::GetSelectedText() const { | 134 base::string16 RenderWidgetHostViewMus::GetSelectedText() const { |
| 140 NOTIMPLEMENTED(); | 135 NOTIMPLEMENTED(); |
| 141 return base::string16(); | 136 return base::string16(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 } | 180 } |
| 186 | 181 |
| 187 void RenderWidgetHostViewMus::UpdateCursor(const WebCursor& cursor) { | 182 void RenderWidgetHostViewMus::UpdateCursor(const WebCursor& cursor) { |
| 188 // TODO(fsamuel): Implement cursors in Mus. | 183 // TODO(fsamuel): Implement cursors in Mus. |
| 189 NOTIMPLEMENTED(); | 184 NOTIMPLEMENTED(); |
| 190 } | 185 } |
| 191 | 186 |
| 192 void RenderWidgetHostViewMus::SetIsLoading(bool is_loading) { | 187 void RenderWidgetHostViewMus::SetIsLoading(bool is_loading) { |
| 193 } | 188 } |
| 194 | 189 |
| 195 void RenderWidgetHostViewMus::UpdateInputMethodIfNecessary( | 190 void RenderWidgetHostViewMus::TextInputStateChanged( |
| 196 bool text_input_state_changed) { | 191 const ViewHostMsg_TextInputState_Params& params) { |
| 197 // TODO: Implement the IME logic when input state changes. | 192 // TODO(fsamuel): Implement an IME mojo app. |
| 198 } | 193 } |
| 199 | 194 |
| 200 void RenderWidgetHostViewMus::ImeCancelComposition() { | 195 void RenderWidgetHostViewMus::ImeCancelComposition() { |
| 201 // TODO(fsamuel): Implement an IME mojo app. | 196 // TODO(fsamuel): Implement an IME mojo app. |
| 202 } | 197 } |
| 203 | 198 |
| 204 void RenderWidgetHostViewMus::ImeCompositionRangeChanged( | 199 void RenderWidgetHostViewMus::ImeCompositionRangeChanged( |
| 205 const gfx::Range& range, | 200 const gfx::Range& range, |
| 206 const std::vector<gfx::Rect>& character_bounds) { | 201 const std::vector<gfx::Rect>& character_bounds) { |
| 207 // TODO(fsamuel): Implement IME. | 202 // TODO(fsamuel): Implement IME. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 297 |
| 303 void RenderWidgetHostViewMus::LockCompositingSurface() { | 298 void RenderWidgetHostViewMus::LockCompositingSurface() { |
| 304 NOTIMPLEMENTED(); | 299 NOTIMPLEMENTED(); |
| 305 } | 300 } |
| 306 | 301 |
| 307 void RenderWidgetHostViewMus::UnlockCompositingSurface() { | 302 void RenderWidgetHostViewMus::UnlockCompositingSurface() { |
| 308 NOTIMPLEMENTED(); | 303 NOTIMPLEMENTED(); |
| 309 } | 304 } |
| 310 | 305 |
| 311 } // namespace content | 306 } // namespace content |
| OLD | NEW |