| OLD | NEW |
| 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 29 matching lines...) Expand all Loading... |
| 40 #include "GraphicsLayerFactoryChromium.h" | 40 #include "GraphicsLayerFactoryChromium.h" |
| 41 #include "HTMLNames.h" | 41 #include "HTMLNames.h" |
| 42 #include "LinkHighlight.h" | 42 #include "LinkHighlight.h" |
| 43 #include "LocalFileSystemClient.h" | 43 #include "LocalFileSystemClient.h" |
| 44 #include "MIDIClientProxy.h" | 44 #include "MIDIClientProxy.h" |
| 45 #include "PageWidgetDelegate.h" | 45 #include "PageWidgetDelegate.h" |
| 46 #include "PinchViewports.h" | 46 #include "PinchViewports.h" |
| 47 #include "PopupContainer.h" | 47 #include "PopupContainer.h" |
| 48 #include "PrerendererClientImpl.h" | 48 #include "PrerendererClientImpl.h" |
| 49 #include "RuntimeEnabledFeatures.h" | 49 #include "RuntimeEnabledFeatures.h" |
| 50 #include "SharedWorkerRepositoryClientImpl.h" |
| 50 #include "SpeechInputClientImpl.h" | 51 #include "SpeechInputClientImpl.h" |
| 51 #include "SpeechRecognitionClientProxy.h" | 52 #include "SpeechRecognitionClientProxy.h" |
| 52 #include "ValidationMessageClientImpl.h" | 53 #include "ValidationMessageClientImpl.h" |
| 53 #include "ViewportAnchor.h" | 54 #include "ViewportAnchor.h" |
| 54 #include "WebAXObject.h" | 55 #include "WebAXObject.h" |
| 55 #include "WebActiveWheelFlingParameters.h" | 56 #include "WebActiveWheelFlingParameters.h" |
| 56 #include "WebAutofillClient.h" | 57 #include "WebAutofillClient.h" |
| 57 #include "WebDevToolsAgentImpl.h" | 58 #include "WebDevToolsAgentImpl.h" |
| 58 #include "WebDevToolsAgentPrivate.h" | 59 #include "WebDevToolsAgentPrivate.h" |
| 59 #include "WebFrameImpl.h" | 60 #include "WebFrameImpl.h" |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 void WebViewImpl::setSpellCheckClient(WebSpellCheckClient* spellCheckClient) | 364 void WebViewImpl::setSpellCheckClient(WebSpellCheckClient* spellCheckClient) |
| 364 { | 365 { |
| 365 m_spellCheckClient = spellCheckClient; | 366 m_spellCheckClient = spellCheckClient; |
| 366 } | 367 } |
| 367 | 368 |
| 368 void WebViewImpl::setPasswordGeneratorClient(WebPasswordGeneratorClient* client) | 369 void WebViewImpl::setPasswordGeneratorClient(WebPasswordGeneratorClient* client) |
| 369 { | 370 { |
| 370 m_passwordGeneratorClient = client; | 371 m_passwordGeneratorClient = client; |
| 371 } | 372 } |
| 372 | 373 |
| 374 void WebViewImpl::setSharedWorkerRepositoryClient(WebSharedWorkerRepositoryClien
t* client) |
| 375 { |
| 376 m_sharedWorkerRepositoryClient = SharedWorkerRepositoryClientImpl::create(cl
ient); |
| 377 m_page->setSharedWorkerRepositoryClient(m_sharedWorkerRepositoryClient.get()
); |
| 378 } |
| 379 |
| 373 WebViewImpl::WebViewImpl(WebViewClient* client) | 380 WebViewImpl::WebViewImpl(WebViewClient* client) |
| 374 : m_client(client) | 381 : m_client(client) |
| 375 , m_autofillClient(0) | 382 , m_autofillClient(0) |
| 376 , m_permissionClient(0) | 383 , m_permissionClient(0) |
| 377 , m_spellCheckClient(0) | 384 , m_spellCheckClient(0) |
| 378 , m_passwordGeneratorClient(0) | 385 , m_passwordGeneratorClient(0) |
| 379 , m_chromeClientImpl(this) | 386 , m_chromeClientImpl(this) |
| 380 , m_contextMenuClientImpl(this) | 387 , m_contextMenuClientImpl(this) |
| 381 , m_dragClientImpl(this) | 388 , m_dragClientImpl(this) |
| 382 , m_editorClientImpl(this) | 389 , m_editorClientImpl(this) |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 m_validationMessage = ValidationMessageClientImpl::create(*this, 0); | 471 m_validationMessage = ValidationMessageClientImpl::create(*this, 0); |
| 465 m_page->setValidationMessageClient(m_validationMessage.get()); | 472 m_page->setValidationMessageClient(m_validationMessage.get()); |
| 466 | 473 |
| 467 m_page->setGroupType(Page::SharedPageGroup); | 474 m_page->setGroupType(Page::SharedPageGroup); |
| 468 | 475 |
| 469 if (m_client) { | 476 if (m_client) { |
| 470 setDeviceScaleFactor(m_client->screenInfo().deviceScaleFactor); | 477 setDeviceScaleFactor(m_client->screenInfo().deviceScaleFactor); |
| 471 setVisibilityState(m_client->visibilityState(), true); | 478 setVisibilityState(m_client->visibilityState(), true); |
| 472 } | 479 } |
| 473 | 480 |
| 481 // FIXME: Remove this when the embedder starts to call |
| 482 // setSharedWorkerRepositoryClient(). |
| 483 setSharedWorkerRepositoryClient(0); |
| 484 |
| 474 m_inspectorSettingsMap = adoptPtr(new SettingsMap); | 485 m_inspectorSettingsMap = adoptPtr(new SettingsMap); |
| 475 } | 486 } |
| 476 | 487 |
| 477 WebViewImpl::~WebViewImpl() | 488 WebViewImpl::~WebViewImpl() |
| 478 { | 489 { |
| 479 ASSERT(!m_page); | 490 ASSERT(!m_page); |
| 480 ASSERT(!m_helperPluginCloseTimer.isActive()); | 491 ASSERT(!m_helperPluginCloseTimer.isActive()); |
| 481 ASSERT(m_helperPluginsPendingClose.isEmpty()); | 492 ASSERT(m_helperPluginsPendingClose.isEmpty()); |
| 482 } | 493 } |
| 483 | 494 |
| (...skipping 3624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4108 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4119 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4109 | 4120 |
| 4110 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4121 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4111 return false; | 4122 return false; |
| 4112 | 4123 |
| 4113 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4124 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4114 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4125 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4115 } | 4126 } |
| 4116 | 4127 |
| 4117 } // namespace WebKit | 4128 } // namespace WebKit |
| OLD | NEW |