Fix that naver page is shown widely when page mode is changed from landscape to portr...
[framework/web/webkit-efl.git] / Source / WebKit2 / WebProcess / WebCoreSupport / WebChromeClient.cpp
1 /*
2  * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
3  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
15  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
18  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
24  * THE POSSIBILITY OF SUCH DAMAGE.
25  */
26
27 #include "config.h"
28 #include "WebChromeClient.h"
29
30 #include "DrawingArea.h"
31 #include "InjectedBundleNavigationAction.h"
32 #include "InjectedBundleUserMessageCoders.h"
33 #include "LayerTreeHost.h"
34 #include "WebColorChooser.h"
35 #include "WebCoreArgumentCoders.h"
36 #include "WebFrame.h"
37 #include "WebFrameLoaderClient.h"
38 #include "WebFullScreenManager.h"
39 #include "WebOpenPanelParameters.h"
40 #include "WebOpenPanelResultListener.h"
41 #include "WebPage.h"
42 #include "WebPageCreationParameters.h"
43 #include "WebPageProxyMessages.h"
44 #include "WebPopupMenu.h"
45 #include "WebPreferencesStore.h"
46 #include "WebProcess.h"
47 #include "WebSearchPopupMenu.h"
48 #include <WebCore/AXObjectCache.h>
49 #include <WebCore/ColorChooser.h>
50 #include <WebCore/DatabaseTracker.h>
51 #include <WebCore/FileChooser.h>
52 #include <WebCore/FileIconLoader.h>
53 #include <WebCore/Frame.h>
54 #include <WebCore/FrameLoadRequest.h>
55 #include <WebCore/FrameLoader.h>
56 #include <WebCore/FrameView.h>
57 #include <WebCore/HTMLNames.h>
58 #include <WebCore/HTMLPlugInImageElement.h>
59 #include <WebCore/Icon.h>
60 #include <WebCore/NotImplemented.h>
61 #include <WebCore/Page.h>
62 #include <WebCore/SecurityOrigin.h>
63 #include <WebCore/Settings.h>
64
65 using namespace WebCore;
66 using namespace HTMLNames;
67
68 namespace WebKit {
69
70 static double area(WebFrame* frame)
71 {
72     IntSize size = frame->visibleContentBoundsExcludingScrollbars().size();
73     return static_cast<double>(size.height()) * size.width();
74 }
75
76
77 static WebFrame* findLargestFrameInFrameSet(WebPage* page)
78 {
79     // Approximate what a user could consider a default target frame for application menu operations.
80
81     WebFrame* mainFrame = page->mainWebFrame();
82     if (!mainFrame->isFrameSet())
83         return 0;
84
85     WebFrame* largestSoFar = 0;
86
87     RefPtr<ImmutableArray> frameChildren = mainFrame->childFrames();
88     size_t count = frameChildren->size();
89     for (size_t i = 0; i < count; ++i) {
90         WebFrame* childFrame = frameChildren->at<WebFrame>(i);
91         if (!largestSoFar || area(childFrame) > area(largestSoFar))
92             largestSoFar = childFrame;
93     }
94
95     return largestSoFar;
96 }
97
98 void WebChromeClient::chromeDestroyed()
99 {
100     delete this;
101 }
102
103 void WebChromeClient::setWindowRect(const FloatRect& windowFrame)
104 {
105     m_page->send(Messages::WebPageProxy::SetWindowFrame(windowFrame));
106 }
107
108 FloatRect WebChromeClient::windowRect()
109 {
110     FloatRect newWindowFrame;
111
112     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame), m_page->pageID()))
113         return FloatRect();
114
115     return newWindowFrame;
116 }
117
118 FloatRect WebChromeClient::pageRect()
119 {
120     return FloatRect(FloatPoint(), m_page->size());
121 }
122
123 void WebChromeClient::focus()
124 {
125     m_page->send(Messages::WebPageProxy::SetFocus(true));
126 }
127
128 void WebChromeClient::unfocus()
129 {
130     m_page->send(Messages::WebPageProxy::SetFocus(false));
131 }
132
133 #if PLATFORM(MAC)
134 void WebChromeClient::makeFirstResponder()
135 {
136     m_page->send(Messages::WebPageProxy::MakeFirstResponder());
137 }    
138 #endif    
139
140 bool WebChromeClient::canTakeFocus(FocusDirection)
141 {
142     notImplemented();
143     return true;
144 }
145
146 void WebChromeClient::takeFocus(FocusDirection direction)
147 {
148     m_page->send(Messages::WebPageProxy::TakeFocus(direction));
149 }
150
151 void WebChromeClient::focusedNodeChanged(Node* node)
152 {
153 #if PLATFORM(EFL)
154     IntRect nodeRect = IntRect(0, 0, 0, 0);
155     if (node) {
156         nodeRect = WebCore::pixelSnappedIntRect(node->getRect());
157         Frame* mainFrame = m_page->corePage()->mainFrame();
158         Frame* frame = node->document()->frame();
159         Node* owner;
160         while (frame && frame != mainFrame) {
161             owner = frame->ownerElement();
162             if (owner) {
163                 nodeRect.setX(nodeRect.x() + owner->getRect().x());
164                 nodeRect.setY(nodeRect.y() + owner->getRect().y());
165                 frame = owner->document()->frame();
166             } else {
167                 break;
168             }
169         }
170         // we have to divide (x, y) with pageZoomFactor because pageZoomFactor was applied to them.
171         nodeRect.setX(nodeRect.x() / m_page->pageScaleFactor());
172         nodeRect.setY(nodeRect.y() / m_page->pageScaleFactor());
173     }
174     m_page->send(Messages::WebPageProxy::FocusedNodeChanged(nodeRect));
175 #else
176     notImplemented();
177 #endif
178 }
179
180 void WebChromeClient::focusedFrameChanged(Frame* frame)
181 {
182     WebFrame* webFrame = frame ? static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame() : 0;
183
184     WebProcess::shared().connection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page->pageID());
185 }
186
187 Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction)
188 {
189     uint32_t modifiers = static_cast<uint32_t>(InjectedBundleNavigationAction::modifiersForNavigationAction(navigationAction));
190     int32_t mouseButton = static_cast<int32_t>(InjectedBundleNavigationAction::mouseButtonForNavigationAction(navigationAction));
191
192     uint64_t newPageID = 0;
193     WebPageCreationParameters parameters;
194     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::CreateNewPage(request.resourceRequest(), windowFeatures, modifiers, mouseButton), Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters), m_page->pageID()))
195         return 0;
196
197     if (!newPageID)
198         return 0;
199
200     WebProcess::shared().createWebPage(newPageID, parameters);
201 #if ENABLE(TIZEN_WEBKIT2_SAME_PAGE_GROUP_FOR_CREATE_WINDOW_OPERATION)
202     WebCore::Page* page = WebProcess::shared().webPage(newPageID)->corePage();
203     page->setGroupName(frame->page()->groupName());
204     return page;
205 #endif
206     return WebProcess::shared().webPage(newPageID)->corePage();
207 }
208
209 void WebChromeClient::show()
210 {
211     m_page->show();
212 }
213
214 bool WebChromeClient::canRunModal()
215 {
216     return m_page->canRunModal();
217 }
218
219 void WebChromeClient::runModal()
220 {
221     m_page->runModal();
222 }
223
224 void WebChromeClient::setToolbarsVisible(bool toolbarsAreVisible)
225 {
226     m_page->send(Messages::WebPageProxy::SetToolbarsAreVisible(toolbarsAreVisible));
227 }
228
229 bool WebChromeClient::toolbarsVisible()
230 {
231     WKBundlePageUIElementVisibility toolbarsVisibility = m_page->injectedBundleUIClient().toolbarsAreVisible(m_page);
232     if (toolbarsVisibility != WKBundlePageUIElementVisibilityUnknown)
233         return toolbarsVisibility == WKBundlePageUIElementVisible;
234     
235     bool toolbarsAreVisible = true;
236     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::GetToolbarsAreVisible(), Messages::WebPageProxy::GetToolbarsAreVisible::Reply(toolbarsAreVisible), m_page->pageID()))
237         return true;
238
239     return toolbarsAreVisible;
240 }
241
242 void WebChromeClient::setStatusbarVisible(bool statusBarIsVisible)
243 {
244     m_page->send(Messages::WebPageProxy::SetStatusBarIsVisible(statusBarIsVisible));
245 }
246
247 bool WebChromeClient::statusbarVisible()
248 {
249     WKBundlePageUIElementVisibility statusbarVisibility = m_page->injectedBundleUIClient().statusBarIsVisible(m_page);
250     if (statusbarVisibility != WKBundlePageUIElementVisibilityUnknown)
251         return statusbarVisibility == WKBundlePageUIElementVisible;
252
253     bool statusBarIsVisible = true;
254     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::GetStatusBarIsVisible(), Messages::WebPageProxy::GetStatusBarIsVisible::Reply(statusBarIsVisible), m_page->pageID()))
255         return true;
256
257     return statusBarIsVisible;
258 }
259
260 void WebChromeClient::setScrollbarsVisible(bool)
261 {
262     notImplemented();
263 }
264
265 bool WebChromeClient::scrollbarsVisible()
266 {
267     notImplemented();
268     return true;
269 }
270
271 void WebChromeClient::setMenubarVisible(bool menuBarVisible)
272 {
273     m_page->send(Messages::WebPageProxy::SetMenuBarIsVisible(menuBarVisible));
274 }
275
276 bool WebChromeClient::menubarVisible()
277 {
278     WKBundlePageUIElementVisibility menubarVisibility = m_page->injectedBundleUIClient().menuBarIsVisible(m_page);
279     if (menubarVisibility != WKBundlePageUIElementVisibilityUnknown)
280         return menubarVisibility == WKBundlePageUIElementVisible;
281     
282     bool menuBarIsVisible = true;
283     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::GetMenuBarIsVisible(), Messages::WebPageProxy::GetMenuBarIsVisible::Reply(menuBarIsVisible), m_page->pageID()))
284         return true;
285
286     return menuBarIsVisible;
287 }
288
289 void WebChromeClient::setResizable(bool resizable)
290 {
291     m_page->send(Messages::WebPageProxy::SetIsResizable(resizable));
292 }
293
294 #if ENABLE(TIZEN_DISPLAY_MESSAGE_TO_CONSOLE)
295 void WebChromeClient::addMessageToConsole(MessageSource, MessageType, MessageLevel level, const String& message, unsigned int lineNumber, const String& sourceID)
296 #else
297 void WebChromeClient::addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID)
298 #endif
299 {
300 #if ENABLE(TIZEN_DISPLAY_MESSAGE_TO_CONSOLE) // Request for WAC SDK
301     String newMessage;
302     if (lineNumber)
303         newMessage = String::format("%s:%d:%s", sourceID.utf8().data(), lineNumber, message.utf8().data());
304     else
305         newMessage = message;
306
307     switch (level) {
308     case WarningMessageLevel:
309         TIZEN_CONSOLEW("%s", newMessage.utf8().data());
310         break;
311     case ErrorMessageLevel:
312         TIZEN_CONSOLEE("%s", newMessage.utf8().data());
313         break;
314     case LogMessageLevel:
315         TIZEN_CONSOLED("%s", newMessage.utf8().data());
316         break;
317     default:
318         TIZEN_CONSOLEI("%s", newMessage.utf8().data());
319         break;
320     }
321 #endif
322     // Notify the bundle client.
323     m_page->injectedBundleUIClient().willAddMessageToConsole(m_page, message, lineNumber);
324
325     notImplemented();
326 }
327
328 bool WebChromeClient::canRunBeforeUnloadConfirmPanel()
329 {
330     return m_page->canRunBeforeUnloadConfirmPanel();
331 }
332
333 bool WebChromeClient::runBeforeUnloadConfirmPanel(const String& message, Frame* frame)
334 {
335 #if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
336     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
337
338     unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
339     bool shouldClose = false;
340 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
341     WebProcess::WaitForJavaScriptPopupFinished waiting;
342 #endif
343     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::RunBeforeUnloadConfirmPanel(message, webFrame->frameID()), Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::Reply(shouldClose), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags))
344         return false;
345
346     return shouldClose;
347 #else
348     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
349
350     bool shouldClose = false;
351     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::RunBeforeUnloadConfirmPanel(message, webFrame->frameID()), Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::Reply(shouldClose), m_page->pageID()))
352         return false;
353
354     return shouldClose;
355 #endif
356 }
357
358 void WebChromeClient::closeWindowSoon()
359 {
360     // FIXME: This code assumes that the client will respond to a close page
361     // message by actually closing the page. Safari does this, but there is
362     // no guarantee that other applications will, which will leave this page
363     // half detached. This approach is an inherent limitation making parts of
364     // a close execute synchronously as part of window.close, but other parts
365     // later on.
366
367     m_page->corePage()->setGroupName(String());
368
369     if (WebFrame* frame = m_page->mainWebFrame()) {
370         if (Frame* coreFrame = frame->coreFrame())
371             coreFrame->loader()->stopForUserCancel();
372     }
373
374     m_page->sendClose();
375 }
376
377 void WebChromeClient::runJavaScriptAlert(Frame* frame, const String& alertText)
378 {
379     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
380
381     // Notify the bundle client.
382     m_page->injectedBundleUIClient().willRunJavaScriptAlert(m_page, alertText, webFrame);
383
384     unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
385 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
386     WebProcess::WaitForJavaScriptPopupFinished waiting;
387 #endif
388     WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::RunJavaScriptAlert(webFrame->frameID(), alertText), Messages::WebPageProxy::RunJavaScriptAlert::Reply(), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags);
389 }
390
391 bool WebChromeClient::runJavaScriptConfirm(Frame* frame, const String& message)
392 {
393     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
394
395     // Notify the bundle client.
396     m_page->injectedBundleUIClient().willRunJavaScriptConfirm(m_page, message, webFrame);
397
398     unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
399     bool result = false;
400 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
401     WebProcess::WaitForJavaScriptPopupFinished waiting;
402 #endif
403     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::RunJavaScriptConfirm(webFrame->frameID(), message), Messages::WebPageProxy::RunJavaScriptConfirm::Reply(result), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags))
404         return false;
405
406     return result;
407 }
408
409 bool WebChromeClient::runJavaScriptPrompt(Frame* frame, const String& message, const String& defaultValue, String& result)
410 {
411     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
412
413     // Notify the bundle client.
414     m_page->injectedBundleUIClient().willRunJavaScriptPrompt(m_page, message, defaultValue, webFrame);
415
416     unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
417 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
418     WebProcess::WaitForJavaScriptPopupFinished waiting;
419 #endif
420     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::RunJavaScriptPrompt(webFrame->frameID(), message, defaultValue), Messages::WebPageProxy::RunJavaScriptPrompt::Reply(result), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags))
421         return false;
422
423     return !result.isNull();
424 }
425
426 void WebChromeClient::setStatusbarText(const String& statusbarText)
427 {
428     // Notify the bundle client.
429     m_page->injectedBundleUIClient().willSetStatusbarText(m_page, statusbarText);
430
431     m_page->send(Messages::WebPageProxy::SetStatusText(statusbarText));
432 }
433
434 bool WebChromeClient::shouldInterruptJavaScript()
435 {
436     bool shouldInterrupt = false;
437     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::ShouldInterruptJavaScript(), Messages::WebPageProxy::ShouldInterruptJavaScript::Reply(shouldInterrupt), m_page->pageID()))
438         return false;
439
440     return shouldInterrupt;
441 }
442
443 KeyboardUIMode WebChromeClient::keyboardUIMode()
444 {
445     return m_page->keyboardUIMode();
446 }
447
448 IntRect WebChromeClient::windowResizerRect() const
449 {
450     return m_page->windowResizerRect();
451 }
452
453 void WebChromeClient::invalidateRootView(const IntRect&, bool)
454 {
455     // Do nothing here, there's no concept of invalidating the window in the web process.
456 }
457
458 void WebChromeClient::invalidateContentsAndRootView(const IntRect& rect, bool)
459 {
460     if (Document* document = m_page->corePage()->mainFrame()->document()) {
461         if (document->printing())
462             return;
463     }
464
465     m_page->drawingArea()->setNeedsDisplay(rect);
466 }
467
468 void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool)
469 {
470     if (Document* document = m_page->corePage()->mainFrame()->document()) {
471         if (document->printing())
472             return;
473     }
474
475     m_page->pageDidScroll();
476     m_page->drawingArea()->setNeedsDisplay(rect);
477 }
478
479 void WebChromeClient::scroll(const IntSize& scrollOffset, const IntRect& scrollRect, const IntRect& clipRect)
480 {
481     m_page->pageDidScroll();
482     m_page->drawingArea()->scroll(intersection(scrollRect, clipRect), scrollOffset);
483 }
484
485 #if USE(TILED_BACKING_STORE)
486 void WebChromeClient::delegatedScrollRequested(const IntPoint& scrollOffset)
487 {
488     m_page->pageDidRequestScroll(scrollOffset);
489 }
490 #endif
491
492 IntPoint WebChromeClient::screenToRootView(const IntPoint& point) const
493 {
494     return m_page->screenToWindow(point);
495 }
496
497 IntRect WebChromeClient::rootViewToScreen(const IntRect& rect) const
498 {
499     return m_page->windowToScreen(rect);
500 }
501
502 PlatformPageClient WebChromeClient::platformPageClient() const
503 {
504     notImplemented();
505     return 0;
506 }
507
508 #if ENABLE(TIZEN_VIEWPORT_META_TAG)
509 bool WebChromeClient::canContentsSizeChange(Frame* frame, const IntSize& size) const
510 {
511     // FIXME1: This patch should be removed AS SOON AS unexpected layout change problem is fixed.
512     // ex) m.news.naver.com
513     // FIXME2: By this patch, contents size is not changed properly on big size contents
514     // ex) www.expedia.com - fixedLayoutSize.width: 980, changedContentsSize: 1272
515     // ex) www.adobe.com - fixedLayoutSize.width: 360, changedContentsSize: 950
516     // ex) www.mt.co.kr (desktop site) - fixedLayoutSize.width: 980, changedContentsSize: 1090
517     FrameView* view = m_page->mainFrame()->view();
518     if (view->fixedLayoutSize().width() != size.width() && size.width() < m_page->viewportSize().width())
519         return false;
520     return true;
521 }
522 #endif
523
524 #if ENABLE(TIZEN_SUPPORT_WEBAPP_META_TAG)
525 bool WebChromeClient::getStandaloneStatus()
526 {
527     bool standalone = false;
528     m_page->sendSync(Messages::WebPageProxy::GetStandaloneStatus(), Messages::WebPageProxy::GetStandaloneStatus::Reply(standalone), m_page->pageID());
529     return standalone;
530 }
531 #endif
532
533 #if ENABLE(TIZEN_SEARCH_PROVIDER)
534 void WebChromeClient::addSearchProvider(const String& baseURL, const String& engineURL)
535 {
536     m_page->send(Messages::WebPageProxy::AddSearchProvider(baseURL, engineURL));
537 }
538
539 unsigned long WebChromeClient::isSearchProviderInstalled(const String& baseURL, const String& engineURL)
540 {
541     uint64_t result;
542     m_page->sendSync(Messages::WebPageProxy::IsSearchProviderInstalled(baseURL, engineURL), Messages::WebPageProxy::IsSearchProviderInstalled::Reply(result));
543     return result;
544 }
545 #endif
546
547 void WebChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const
548 {
549     if (!m_page->corePage()->settings()->frameFlatteningEnabled()) {
550         WebFrame* largestFrame = findLargestFrameInFrameSet(m_page);
551         if (largestFrame != m_cachedFrameSetLargestFrame.get()) {
552             m_cachedFrameSetLargestFrame = largestFrame;
553             m_page->send(Messages::WebPageProxy::FrameSetLargestFrameChanged(largestFrame ? largestFrame->frameID() : 0));
554         }
555     }
556
557     if (frame->page()->mainFrame() != frame)
558         return;
559
560 #if PLATFORM(QT) || (PLATFORM(EFL) && USE(TILED_BACKING_STORE))
561     if (m_page->useFixedLayout()) {
562         // The below method updates the size().
563         m_page->resizeToContentsIfNeeded();
564         m_page->drawingArea()->layerTreeHost()->sizeDidChange(m_page->size());
565     }
566
567 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
568     // FIXME: Logic to calculate the node's position is inefficient.
569     Frame* focusedFrame = m_page->corePage()->focusController()->focusedFrame();
570     if(focusedFrame && focusedFrame->document() && focusedFrame->document()->focusedNode()) {
571         Node* node = focusedFrame->document()->focusedNode();
572         IntRect nodeRect = IntRect(0, 0, 0, 0);
573         if (node) {
574             nodeRect = WebCore::pixelSnappedIntRect(node->getRect());
575             Frame* mainFrame = m_page->corePage()->mainFrame();
576             Frame* frame = node->document()->frame();
577             Node* owner;
578             while (frame && frame != mainFrame) {
579                 owner = frame->ownerElement();
580                 if (!owner)
581                     break;
582
583                 nodeRect.setX(nodeRect.x() + owner->getRect().x());
584                 nodeRect.setY(nodeRect.y() + owner->getRect().y());
585                 frame = owner->document()->frame();
586             }
587             // we have to divide (x, y) with pageZoomFactor because pageZoomFactor was applied to them.
588             nodeRect.setX(nodeRect.x() / m_page->pageScaleFactor());
589             nodeRect.setY(nodeRect.y() / m_page->pageScaleFactor());
590         }
591         m_page->send(Messages::WebPageProxy::FocusedNodeChanged(nodeRect));
592     }
593 #endif
594
595     m_page->send(Messages::WebPageProxy::DidChangeContentsSize(m_page->size()));
596 #endif
597
598     FrameView* frameView = frame->view();
599     if (frameView && !frameView->delegatesScrolling())  {
600         bool hasHorizontalScrollbar = frameView->horizontalScrollbar();
601         bool hasVerticalScrollbar = frameView->verticalScrollbar();
602
603         if (hasHorizontalScrollbar != m_cachedMainFrameHasHorizontalScrollbar || hasVerticalScrollbar != m_cachedMainFrameHasVerticalScrollbar) {
604             m_page->send(Messages::WebPageProxy::DidChangeScrollbarsForMainFrame(hasHorizontalScrollbar, hasVerticalScrollbar));
605
606             m_cachedMainFrameHasHorizontalScrollbar = hasHorizontalScrollbar;
607             m_cachedMainFrameHasVerticalScrollbar = hasVerticalScrollbar;
608         }
609     }
610 }
611
612 void WebChromeClient::scrollRectIntoView(const IntRect&) const
613 {
614     notImplemented();
615 }
616
617 bool WebChromeClient::shouldUnavailablePluginMessageBeButton(RenderEmbeddedObject::PluginUnavailabilityReason pluginUnavailabilityReason) const
618 {
619     if (pluginUnavailabilityReason == RenderEmbeddedObject::PluginMissing || pluginUnavailabilityReason == RenderEmbeddedObject::InsecurePluginVersion) {
620         // FIXME: <rdar://problem/8794397> We should only return true when there is a
621         // missingPluginButtonClicked callback defined on the Page UI client.
622         return true;
623     }
624
625     return false;
626 }
627     
628 void WebChromeClient::unavailablePluginButtonClicked(Element* element, RenderEmbeddedObject::PluginUnavailabilityReason pluginUnavailabilityReason) const
629 {
630     ASSERT(element->hasTagName(objectTag) || element->hasTagName(embedTag) || element->hasTagName(appletTag));
631     ASSERT(pluginUnavailabilityReason == RenderEmbeddedObject::PluginMissing || pluginUnavailabilityReason == RenderEmbeddedObject::InsecurePluginVersion);
632
633     HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(element);
634
635     m_page->send(Messages::WebPageProxy::UnavailablePluginButtonClicked(pluginUnavailabilityReason, pluginElement->serviceType(), pluginElement->url(), pluginElement->getAttribute(pluginspageAttr)));
636 }
637
638 void WebChromeClient::scrollbarsModeDidChange() const
639 {
640     notImplemented();
641 }
642
643 void WebChromeClient::mouseDidMoveOverElement(const HitTestResult& hitTestResult, unsigned modifierFlags)
644 {
645     RefPtr<APIObject> userData;
646
647     // Notify the bundle client.
648     m_page->injectedBundleUIClient().mouseDidMoveOverElement(m_page, hitTestResult, static_cast<WebEvent::Modifiers>(modifierFlags), userData);
649
650     // Notify the UIProcess.
651     WebHitTestResult::Data webHitTestResultData(hitTestResult);
652     m_page->send(Messages::WebPageProxy::MouseDidMoveOverElement(webHitTestResultData, modifierFlags, InjectedBundleUserMessageEncoder(userData.get())));
653 }
654
655 void WebChromeClient::setToolTip(const String& toolTip, TextDirection)
656 {
657     // Only send a tool tip to the WebProcess if it has changed since the last time this function was called.
658
659     if (toolTip == m_cachedToolTip)
660         return;
661     m_cachedToolTip = toolTip;
662
663     m_page->send(Messages::WebPageProxy::SetToolTip(m_cachedToolTip));
664 }
665
666 void WebChromeClient::print(Frame* frame)
667 {
668     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
669     m_page->sendSync(Messages::WebPageProxy::PrintFrame(webFrame->frameID()), Messages::WebPageProxy::PrintFrame::Reply());
670 }
671
672 #if ENABLE(SQL_DATABASE)
673 void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& databaseName)
674 {
675     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
676     SecurityOrigin* origin = frame->document()->securityOrigin();
677
678     DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(databaseName, origin);
679     uint64_t currentQuota = DatabaseTracker::tracker().quotaForOrigin(origin);
680
681 #if ENABLE(TIZEN_SQL_DATABASE)
682     uint64_t newQuota = 0;
683     const uint64_t defaultQuota = 5 * 1024 * 1024;
684     uint64_t requirement = currentQuota + details.expectedUsage();
685     if (requirement <= defaultQuota)
686         newQuota = requirement;
687     else {
688         unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
689         bool allowExceed = false;
690         WebProcess::shared().connection()->sendSync(
691             Messages::WebPageProxy::ExceededDatabaseQuota(webFrame->frameID(), origin->databaseIdentifier(), details.displayName(), details.expectedUsage()),
692             Messages::WebPageProxy::ExceededDatabaseQuota::Reply(allowExceed), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags);
693         if (allowExceed)
694             newQuota = currentQuota + details.expectedUsage();
695         else
696             newQuota = currentQuota;
697     }
698 #else
699     uint64_t currentOriginUsage = DatabaseTracker::tracker().usageForOrigin(origin);
700     uint64_t newQuota = 0;
701     WebProcess::shared().connection()->sendSync(
702         Messages::WebPageProxy::ExceededDatabaseQuota(webFrame->frameID(), origin->databaseIdentifier(), databaseName, details.displayName(), currentQuota, currentOriginUsage, details.currentUsage(), details.expectedUsage()),
703         Messages::WebPageProxy::ExceededDatabaseQuota::Reply(newQuota), m_page->pageID());
704 #endif
705
706     DatabaseTracker::tracker().setQuota(origin, newQuota);
707 }
708 #endif
709
710
711 void WebChromeClient::reachedMaxAppCacheSize(int64_t)
712 {
713     notImplemented();
714 }
715
716 void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t)
717 {
718     notImplemented();
719 }
720
721 #if ENABLE(TIZEN_APPLICATION_CACHE)
722 bool WebChromeClient::requestApplicationCachePermission(Frame* frame)
723 {
724     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
725     SecurityOrigin* origin = frame->document()->securityOrigin();
726
727     unsigned syncSendFlags = WebCore::AXObjectCache::accessibilityEnabled() ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
728     bool allow = false;
729 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
730     WebProcess::WaitForJavaScriptPopupFinished waiting;
731 #endif
732
733     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::RequestApplicationCachePermission(webFrame->frameID(), origin->databaseIdentifier()), Messages::WebPageProxy::RequestApplicationCachePermission::Reply(allow), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags))
734         return false;
735
736     return allow;
737 }
738 #endif
739
740 #if ENABLE(DASHBOARD_SUPPORT)
741 void WebChromeClient::dashboardRegionsChanged()
742 {
743     notImplemented();
744 }
745 #endif
746
747 void WebChromeClient::populateVisitedLinks()
748 {
749 }
750
751 FloatRect WebChromeClient::customHighlightRect(Node*, const AtomicString& type, const FloatRect& lineRect)
752 {
753     notImplemented();
754     return FloatRect();
755 }
756
757 void WebChromeClient::paintCustomHighlight(Node*, const AtomicString& type, const FloatRect& boxRect, const FloatRect& lineRect,
758                                   bool behindText, bool entireLine)
759 {
760     notImplemented();
761 }
762
763 bool WebChromeClient::shouldReplaceWithGeneratedFileForUpload(const String& path, String& generatedFilename)
764 {
765     generatedFilename = m_page->injectedBundleUIClient().shouldGenerateFileForUpload(m_page, path);
766     return !generatedFilename.isNull();
767 }
768
769 String WebChromeClient::generateReplacementFile(const String& path)
770 {
771     return m_page->injectedBundleUIClient().generateFileForUpload(m_page, path);
772 }
773
774 bool WebChromeClient::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
775 {
776     if (!m_page->injectedBundleUIClient().shouldPaintCustomOverhangArea())
777         return false;
778
779     m_page->injectedBundleUIClient().paintCustomOverhangArea(m_page, context, horizontalOverhangArea, verticalOverhangArea, dirtyRect);
780     return true;
781 }
782
783 #if ENABLE(INPUT_TYPE_COLOR)
784 PassOwnPtr<ColorChooser> WebChromeClient::createColorChooser(ColorChooserClient* client, const Color& initialColor)
785 {
786     if (m_page->activeColorChooser())
787         return nullptr;
788
789     return adoptPtr(new WebColorChooser(m_page, client, initialColor));
790 }
791 #endif
792
793 void WebChromeClient::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
794 {
795 #if OS(TIZEN)
796     if (m_page->activeOpenPanelResultListener())
797         m_page->cancelForOpenPanel();
798 #else
799     if (m_page->activeOpenPanelResultListener())
800         return;
801 #endif
802
803     RefPtr<FileChooser> fileChooser = prpFileChooser;
804
805     m_page->setActiveOpenPanelResultListener(WebOpenPanelResultListener::create(m_page, fileChooser.get()));
806     m_page->send(Messages::WebPageProxy::RunOpenPanel(static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame()->frameID(), fileChooser->settings()));
807 }
808
809 void WebChromeClient::loadIconForFiles(const Vector<String>& filenames, FileIconLoader* loader)
810 {
811     loader->notifyFinished(Icon::createIconForFiles(filenames));
812 }
813
814 void WebChromeClient::setCursor(const WebCore::Cursor& cursor)
815 {
816 #if USE(LAZY_NATIVE_CURSOR)
817     m_page->send(Messages::WebPageProxy::SetCursor(cursor));
818 #endif
819 }
820
821 void WebChromeClient::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
822 {
823     m_page->send(Messages::WebPageProxy::SetCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves));
824 }
825
826 #if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
827 void WebChromeClient::scheduleAnimation()
828 {
829 #if USE(UI_SIDE_COMPOSITING)
830     m_page->drawingArea()->layerTreeHost()->scheduleAnimation();
831 #endif
832 }
833 #endif
834
835 void WebChromeClient::formStateDidChange(const Node*)
836 {
837     notImplemented();
838 }
839
840 bool WebChromeClient::selectItemWritingDirectionIsNatural()
841 {
842 #if PLATFORM(WIN)
843     return true;
844 #else
845     return false;
846 #endif
847 }
848
849 bool WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection()
850 {
851 #if PLATFORM(WIN)
852     return false;
853 #else
854     return true;
855 #endif
856 }
857
858 bool WebChromeClient::hasOpenedPopup() const
859 {
860     notImplemented();
861     return false;
862 }
863
864 PassRefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const
865 {
866     return WebPopupMenu::create(m_page, client);
867 }
868
869 PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const
870 {
871     return WebSearchPopupMenu::create(m_page, client);
872 }
873
874 #if USE(ACCELERATED_COMPOSITING)
875 void WebChromeClient::attachRootGraphicsLayer(Frame*, GraphicsLayer* layer)
876 {
877     if (layer)
878         m_page->enterAcceleratedCompositingMode(layer);
879     else
880         m_page->exitAcceleratedCompositingMode();
881 }
882
883 void WebChromeClient::setNeedsOneShotDrawingSynchronization()
884 {
885 #if ENABLE(TIZEN_ONESHOT_DRAWING_SYNCHRONIZATION)
886     if (m_page->drawingArea())
887         m_page->drawingArea()->setNeedsOneShotDrawingSynchronization();
888 #else
889     notImplemented();
890 #endif
891 }
892
893 void WebChromeClient::scheduleCompositingLayerSync()
894 {
895     if (m_page->drawingArea())
896         m_page->drawingArea()->scheduleCompositingLayerSync();
897 }
898
899 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
900 void WebChromeClient::addOrUpdateScrollingLayer(WebCore::Node*, WebCore::GraphicsLayer* scrollingLayer, WebCore::GraphicsLayer* contentsLayer, const WebCore::IntSize& scrollSize)
901 {
902     if (!m_page->drawingArea())
903         return;
904     m_page->drawingArea()->addOrUpdateScrollingLayer(scrollingLayer, contentsLayer, scrollSize);
905 }
906
907 void WebChromeClient::removeScrollingLayer(WebCore::Node*, WebCore::GraphicsLayer* scrollingLayer, WebCore::GraphicsLayer* contentsLayer)
908 {
909     if (!m_page->drawingArea())
910         return;
911     m_page->drawingArea()->removeScrollingLayer(scrollingLayer, contentsLayer);
912 }
913 #endif // ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
914 #endif // USE(ACCELERATED_COMPOSITING)
915
916 #if PLATFORM(WIN) && USE(AVFOUNDATION)
917 WebCore::GraphicsDeviceAdapter* WebChromeClient::graphicsDeviceAdapter() const
918 {
919     if (!m_page->drawingArea())
920         return 0;
921     return m_page->drawingArea()->layerTreeHost()->graphicsDeviceAdapter();
922 }
923 #endif
924
925 #if ENABLE(TOUCH_EVENTS)
926 void WebChromeClient::needTouchEvents(bool needTouchEvents)
927 {
928     m_page->send(Messages::WebPageProxy::NeedTouchEvents(needTouchEvents));
929 }
930 #endif
931
932 #if PLATFORM(WIN)
933 void WebChromeClient::setLastSetCursorToCurrentCursor()
934 {
935 }
936 #endif
937
938 #if ENABLE(FULLSCREEN_API)
939 bool WebChromeClient::supportsFullScreenForElement(const WebCore::Element* element, bool withKeyboard)
940 {
941     return m_page->fullScreenManager()->supportsFullScreen(withKeyboard);
942 }
943
944 void WebChromeClient::enterFullScreenForElement(WebCore::Element* element)
945 {
946     m_page->fullScreenManager()->enterFullScreenForElement(element);
947 }
948
949 void WebChromeClient::exitFullScreenForElement(WebCore::Element* element)
950 {
951     m_page->fullScreenManager()->exitFullScreenForElement(element);
952 }
953 #endif
954
955 void WebChromeClient::dispatchViewportPropertiesDidChange(const ViewportArguments&) const
956 {
957 #if USE(TILED_BACKING_STORE)
958     if (!m_page->useFixedLayout())
959         return;
960
961     m_page->sendViewportAttributesChanged();
962 #endif
963 }
964
965 void WebChromeClient::notifyScrollerThumbIsVisibleInRect(const IntRect& scrollerThumb)
966 {
967     m_page->send(Messages::WebPageProxy::NotifyScrollerThumbIsVisibleInRect(scrollerThumb));
968 }
969
970 void WebChromeClient::recommendedScrollbarStyleDidChange(int32_t newStyle)
971 {
972     m_page->send(Messages::WebPageProxy::RecommendedScrollbarStyleDidChange(newStyle));
973 }
974
975 bool WebChromeClient::shouldRubberBandInDirection(WebCore::ScrollDirection direction) const
976 {
977     ASSERT(direction != WebCore::ScrollUp && direction != WebCore::ScrollDown);
978     
979     if (direction == WebCore::ScrollLeft)
980         return m_page->injectedBundleUIClient().shouldRubberBandInDirection(m_page, WKScrollDirectionLeft);
981     if (direction == WebCore::ScrollRight)
982         return m_page->injectedBundleUIClient().shouldRubberBandInDirection(m_page, WKScrollDirectionRight);
983
984     ASSERT_NOT_REACHED();
985     return true;
986 }
987
988 void WebChromeClient::numWheelEventHandlersChanged(unsigned count)
989 {
990     m_page->numWheelEventHandlersChanged(count);
991 }
992
993 #if ENABLE(SCREEN_ORIENTATION_SUPPORT) && ENABLE(TIZEN_SCREEN_ORIENTATION_SUPPORT)
994 bool WebChromeClient::lockOrientation(int willLockOrientation)
995 {
996     bool result = false;
997     m_page->sendSync(Messages::WebPageProxy::LockOrientation(willLockOrientation), Messages::WebPageProxy::LockOrientation::Reply(result));
998     return result;
999 }
1000 void WebChromeClient::unlockOrientation()
1001 {
1002     m_page->send(Messages::WebPageProxy::UnlockOrientation());
1003 }
1004 #endif
1005
1006 void WebChromeClient::logDiagnosticMessage(const String& message, const String& description, const String& success)
1007 {
1008     if (!m_page->corePage()->settings()->diagnosticLoggingEnabled())
1009         return;
1010
1011     m_page->injectedBundleDiagnosticLoggingClient().logDiagnosticMessage(m_page, message, description, success);
1012 }
1013
1014 #if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
1015 void WebChromeClient::requestVisibleContentRectRestore(const IntPoint& scrollOffset, float scale)
1016 {
1017     m_page->pageDidRequestRestoreVisibleContentRect(scrollOffset, scale);
1018 }
1019
1020 float WebChromeClient::contentsScaleFactor() const
1021 {
1022     if (!m_page->drawingArea())
1023         return 0;
1024     return m_page->drawingArea()->layerTreeHost()->contentsScaleFactor();
1025 }
1026 #endif
1027
1028 #if OS(TIZEN)
1029 void WebChromeClient::rendererWillBeDestroyed(RenderObject* object)
1030 {
1031 #if ENABLE(TIZEN_SCREEN_READER)
1032     m_page->updateScreenReaderFocus(object);
1033 #endif
1034
1035 #if ENABLE(TIZEN_ISF_PORT)
1036     if (object->node() && object->node()->isRootEditableElement())
1037         m_page->send(Messages::WebPageProxy::RemoveInputMethodContext(reinterpret_cast<uintptr_t>(object->node())));
1038 #endif
1039 }
1040 #endif
1041
1042 #if ENABLE(TIZEN_INDEXED_DATABASE)
1043 bool WebChromeClient::exceededIndexedDatabaseQuota(Frame* frame, int64_t currentQuota)
1044 {
1045     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
1046     SecurityOrigin* origin = frame->document()->securityOrigin();
1047
1048     unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
1049     bool allow = false;
1050 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1051     WebProcess::WaitForJavaScriptPopupFinished waiting;
1052 #endif
1053     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::ExceededIndexedDatabaseQuota(webFrame->frameID(), origin->databaseIdentifier(), currentQuota), Messages::WebPageProxy::ExceededIndexedDatabaseQuota::Reply(allow), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags))
1054         return false;
1055
1056     return allow;
1057 }
1058 #endif
1059
1060 #if ENABLE(TIZEN_FILE_SYSTEM)
1061 bool WebChromeClient::exceededLocalFileSystemQuota(Frame* frame, int64_t currentQuota)
1062 {
1063     WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
1064     SecurityOrigin* origin = frame->document()->securityOrigin();
1065
1066     unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
1067     bool result = false;
1068 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1069     WebProcess::WaitForJavaScriptPopupFinished waiting;
1070 #endif
1071     if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::ExceededLocalFileSystemQuota(webFrame->frameID(), origin->databaseIdentifier(), currentQuota), Messages::WebPageProxy::ExceededLocalFileSystemQuota::Reply(result), m_page->pageID(), CoreIPC::Connection::DefaultTimeout, syncSendFlags))
1072         return false;
1073
1074     return result;
1075 }
1076 #endif
1077
1078 #if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR)
1079 void WebChromeClient::setContentSuspendedByInspector(bool isSuspended)
1080 {
1081     m_page->send(Messages::WebPageProxy::setContentSuspendedByInspector(isSuspended));
1082 }
1083 #endif
1084 } // namespace WebKit