| 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 found | 2 // Use of this source code is governed by a BSD-style license that can be found |
| 3 // in the LICENSE file. | 3 // in the LICENSE file. |
| 4 | 4 |
| 5 #include "web/WebViewFrameWidget.h" | 5 #include "web/WebViewFrameWidget.h" |
| 6 | 6 |
| 7 #include "web/WebInputMethodControllerImpl.h" |
| 7 #include "web/WebLocalFrameImpl.h" | 8 #include "web/WebLocalFrameImpl.h" |
| 8 #include "web/WebViewImpl.h" | 9 #include "web/WebViewImpl.h" |
| 9 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 | 12 |
| 12 WebViewFrameWidget::WebViewFrameWidget(WebWidgetClient* client, WebViewImpl& web
View, WebLocalFrameImpl& mainFrame) | 13 WebViewFrameWidget::WebViewFrameWidget(WebWidgetClient* client, WebViewImpl& web
View, WebLocalFrameImpl& mainFrame) |
| 13 : m_client(client), m_webView(&webView), m_mainFrame(&mainFrame) | 14 : m_client(client), m_webView(&webView), m_mainFrame(&mainFrame) |
| 14 { | 15 { |
| 15 m_mainFrame->setFrameWidget(this); | 16 m_mainFrame->setFrameWidget(this); |
| 16 m_webView->setCompositorVisibility(true); | 17 m_webView->setCompositorVisibility(true); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 void WebViewFrameWidget::mouseCaptureLost() | 122 void WebViewFrameWidget::mouseCaptureLost() |
| 122 { | 123 { |
| 123 return m_webView->mouseCaptureLost(); | 124 return m_webView->mouseCaptureLost(); |
| 124 } | 125 } |
| 125 | 126 |
| 126 void WebViewFrameWidget::setFocus(bool enable) | 127 void WebViewFrameWidget::setFocus(bool enable) |
| 127 { | 128 { |
| 128 return m_webView->setFocus(enable); | 129 return m_webView->setFocus(enable); |
| 129 } | 130 } |
| 130 | 131 |
| 131 bool WebViewFrameWidget::setComposition( | |
| 132 const WebString& text, | |
| 133 const WebVector<WebCompositionUnderline>& underlines, | |
| 134 int selectionStart, | |
| 135 int selectionEnd) | |
| 136 { | |
| 137 return m_webView->setComposition(text, underlines, selectionStart, selection
End); | |
| 138 } | |
| 139 | |
| 140 bool WebViewFrameWidget::finishComposingText(ConfirmCompositionBehavior selectio
nBehavior) | |
| 141 { | |
| 142 return m_webView->finishComposingText(selectionBehavior); | |
| 143 } | |
| 144 | |
| 145 bool WebViewFrameWidget::commitText(const WebString& text, int relativeCaretPosi
tion) | |
| 146 { | |
| 147 return m_webView->commitText(text, relativeCaretPosition); | |
| 148 } | |
| 149 | |
| 150 WebRange WebViewFrameWidget::compositionRange() | 132 WebRange WebViewFrameWidget::compositionRange() |
| 151 { | 133 { |
| 152 return m_webView->compositionRange(); | 134 return m_webView->compositionRange(); |
| 153 } | 135 } |
| 154 | 136 |
| 155 WebTextInputInfo WebViewFrameWidget::textInputInfo() | 137 WebTextInputInfo WebViewFrameWidget::textInputInfo() |
| 156 { | 138 { |
| 157 return m_webView->textInputInfo(); | 139 return m_webView->textInputInfo(); |
| 158 } | 140 } |
| 159 | 141 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 void WebViewFrameWidget::setBaseBackgroundColor(WebColor color) | 242 void WebViewFrameWidget::setBaseBackgroundColor(WebColor color) |
| 261 { | 243 { |
| 262 m_webView->setBaseBackgroundColor(color); | 244 m_webView->setBaseBackgroundColor(color); |
| 263 } | 245 } |
| 264 | 246 |
| 265 WebLocalFrameImpl* WebViewFrameWidget::localRoot() | 247 WebLocalFrameImpl* WebViewFrameWidget::localRoot() |
| 266 { | 248 { |
| 267 return m_webView->mainFrameImpl(); | 249 return m_webView->mainFrameImpl(); |
| 268 } | 250 } |
| 269 | 251 |
| 252 WebInputMethodControllerImpl* WebViewFrameWidget::getActiveWebInputMethodControl
ler() const |
| 253 { |
| 254 return m_webView->getActiveWebInputMethodController(); |
| 255 } |
| 256 |
| 270 void WebViewFrameWidget::scheduleAnimation() | 257 void WebViewFrameWidget::scheduleAnimation() |
| 271 { | 258 { |
| 272 m_webView->scheduleAnimationForWidget(); | 259 m_webView->scheduleAnimationForWidget(); |
| 273 } | 260 } |
| 274 | 261 |
| 275 CompositorProxyClient* WebViewFrameWidget::createCompositorProxyClient() | 262 CompositorProxyClient* WebViewFrameWidget::createCompositorProxyClient() |
| 276 { | 263 { |
| 277 return m_webView->createCompositorProxyClient(); | 264 return m_webView->createCompositorProxyClient(); |
| 278 } | 265 } |
| 279 | 266 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 296 { | 283 { |
| 297 m_webView->detachCompositorAnimationTimeline(compositorTimeline); | 284 m_webView->detachCompositorAnimationTimeline(compositorTimeline); |
| 298 } | 285 } |
| 299 | 286 |
| 300 HitTestResult WebViewFrameWidget::coreHitTestResultAt(const WebPoint& point) | 287 HitTestResult WebViewFrameWidget::coreHitTestResultAt(const WebPoint& point) |
| 301 { | 288 { |
| 302 return m_webView->coreHitTestResultAt(point); | 289 return m_webView->coreHitTestResultAt(point); |
| 303 } | 290 } |
| 304 | 291 |
| 305 } // namespace blink | 292 } // namespace blink |
| OLD | NEW |