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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add WebViewHelper for unittests. Created 7 years, 3 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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "RuntimeEnabledFeatures.h" 66 #include "RuntimeEnabledFeatures.h"
67 #include "SpeechInputClientImpl.h" 67 #include "SpeechInputClientImpl.h"
68 #include "SpeechRecognitionClientProxy.h" 68 #include "SpeechRecognitionClientProxy.h"
69 #include "ValidationMessageClientImpl.h" 69 #include "ValidationMessageClientImpl.h"
70 #include "ViewportAnchor.h" 70 #include "ViewportAnchor.h"
71 #include "WebAXObject.h" 71 #include "WebAXObject.h"
72 #include "WebActiveWheelFlingParameters.h" 72 #include "WebActiveWheelFlingParameters.h"
73 #include "WebAutofillClient.h" 73 #include "WebAutofillClient.h"
74 #include "WebDevToolsAgentImpl.h" 74 #include "WebDevToolsAgentImpl.h"
75 #include "WebDevToolsAgentPrivate.h" 75 #include "WebDevToolsAgentPrivate.h"
76 #include "WebFrameClient.h"
76 #include "WebFrameImpl.h" 77 #include "WebFrameImpl.h"
77 #include "WebHelperPluginImpl.h" 78 #include "WebHelperPluginImpl.h"
78 #include "WebHitTestResult.h" 79 #include "WebHitTestResult.h"
79 #include "WebInputElement.h" 80 #include "WebInputElement.h"
80 #include "WebInputEvent.h" 81 #include "WebInputEvent.h"
81 #include "WebInputEventConversion.h" 82 #include "WebInputEventConversion.h"
82 #include "WebMediaPlayerAction.h" 83 #include "WebMediaPlayerAction.h"
83 #include "WebNode.h" 84 #include "WebNode.h"
84 #include "WebPagePopupImpl.h" 85 #include "WebPagePopupImpl.h"
85 #include "WebPlugin.h" 86 #include "WebPlugin.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 306 }
306 307
307 void WebView::didExitModalLoop() 308 void WebView::didExitModalLoop()
308 { 309 {
309 ASSERT(pageGroupLoadDeferrerStack().size()); 310 ASSERT(pageGroupLoadDeferrerStack().size());
310 311
311 delete pageGroupLoadDeferrerStack().last(); 312 delete pageGroupLoadDeferrerStack().last();
312 pageGroupLoadDeferrerStack().removeLast(); 313 pageGroupLoadDeferrerStack().removeLast();
313 } 314 }
314 315
315 void WebViewImpl::initializeMainFrame(WebFrameClient* frameClient) 316 void WebViewImpl::initializeMainFrame(WebFrame* frame)
316 { 317 {
317 // NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame 318 // NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame
318 // and releases that reference once the corresponding Frame is destroyed. 319 // and releases that reference once the corresponding Frame is destroyed.
319 RefPtr<WebFrameImpl> frame = WebFrameImpl::create(frameClient); 320 static_cast<WebFrameImpl*>(frame)->initializeAsMainFrame(page());
320
321 frame->initializeAsMainFrame(page());
322 }
323
324 void WebViewImpl::initializeHelperPluginFrame(WebFrameClient* client)
325 {
326 RefPtr<WebFrameImpl> frame = WebFrameImpl::create(client);
327 } 321 }
328 322
329 void WebViewImpl::setAutofillClient(WebAutofillClient* autofillClient) 323 void WebViewImpl::setAutofillClient(WebAutofillClient* autofillClient)
330 { 324 {
331 m_autofillClient = autofillClient; 325 m_autofillClient = autofillClient;
332 } 326 }
333 327
334 void WebViewImpl::setDevToolsAgentClient(WebDevToolsAgentClient* devToolsClient) 328 void WebViewImpl::setDevToolsAgentClient(WebDevToolsAgentClient* devToolsClient)
335 { 329 {
336 if (devToolsClient) 330 if (devToolsClient)
(...skipping 3777 matching lines...) Expand 10 before | Expand all | Expand 10 after
4114 // the initial viewport width. 4108 // the initial viewport width.
4115 // 2. The author has disabled viewport zoom. 4109 // 2. The author has disabled viewport zoom.
4116 4110
4117 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4111 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4118 4112
4119 return fixedLayoutSize().width == m_size.width 4113 return fixedLayoutSize().width == m_size.width
4120 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4114 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4121 } 4115 }
4122 4116
4123 } // namespace WebKit 4117 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698