Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: third_party/WebKit/Source/web/WebViewFrameWidget.cpp

Issue 2773003002: Make the WebWidgetClient parameter a ref so it's not legal to pass a nullptr. (Closed)
Patch Set: WebViewClient dtor now overrides the virtual dtor in WebWidgetClient. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/WebInputMethodControllerImpl.h"
8 #include "web/WebLocalFrameImpl.h" 8 #include "web/WebLocalFrameImpl.h"
9 #include "web/WebViewImpl.h" 9 #include "web/WebViewImpl.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 WebViewFrameWidget::WebViewFrameWidget(WebWidgetClient* client, 13 WebViewFrameWidget::WebViewFrameWidget(WebWidgetClient& client,
14 WebViewImpl& webView, 14 WebViewImpl& webView,
15 WebLocalFrameImpl& mainFrame) 15 WebLocalFrameImpl& mainFrame)
16 : m_client(client), m_webView(&webView), m_mainFrame(&mainFrame) { 16 : m_client(&client), m_webView(&webView), m_mainFrame(&mainFrame) {
17 m_mainFrame->setFrameWidget(this); 17 m_mainFrame->setFrameWidget(this);
18 m_webView->setCompositorVisibility(true); 18 m_webView->setCompositorVisibility(true);
19 } 19 }
20 20
21 WebViewFrameWidget::~WebViewFrameWidget() {} 21 WebViewFrameWidget::~WebViewFrameWidget() {}
22 22
23 void WebViewFrameWidget::close() { 23 void WebViewFrameWidget::close() {
24 // Note: it's important to use the captured main frame pointer here. During 24 // Note: it's important to use the captured main frame pointer here. During
25 // a frame swap, the swapped frame is detached *after* the frame tree is 25 // a frame swap, the swapped frame is detached *after* the frame tree is
26 // updated. If the main frame is being swapped, then 26 // updated. If the main frame is being swapped, then
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 CompositorAnimationHost* WebViewFrameWidget::animationHost() const { 224 CompositorAnimationHost* WebViewFrameWidget::animationHost() const {
225 return m_webView->animationHost(); 225 return m_webView->animationHost();
226 } 226 }
227 227
228 HitTestResult WebViewFrameWidget::coreHitTestResultAt(const WebPoint& point) { 228 HitTestResult WebViewFrameWidget::coreHitTestResultAt(const WebPoint& point) {
229 return m_webView->coreHitTestResultAt(point); 229 return m_webView->coreHitTestResultAt(point);
230 } 230 }
231 231
232 } // namespace blink 232 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewFrameWidget.h ('k') | third_party/WebKit/public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698