| 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 m_userGestureObserved(false), | 428 m_userGestureObserved(false), |
| 429 m_shouldDispatchFirstVisuallyNonEmptyLayout(false), | 429 m_shouldDispatchFirstVisuallyNonEmptyLayout(false), |
| 430 m_shouldDispatchFirstLayoutAfterFinishedParsing(false), | 430 m_shouldDispatchFirstLayoutAfterFinishedParsing(false), |
| 431 m_shouldDispatchFirstLayoutAfterFinishedLoading(false), | 431 m_shouldDispatchFirstLayoutAfterFinishedLoading(false), |
| 432 m_displayMode(WebDisplayModeBrowser), | 432 m_displayMode(WebDisplayModeBrowser), |
| 433 m_elasticOverscroll(FloatSize()), | 433 m_elasticOverscroll(FloatSize()), |
| 434 m_mutator(nullptr), | 434 m_mutator(nullptr), |
| 435 m_scheduler(wrapUnique(Platform::current() | 435 m_scheduler(wrapUnique(Platform::current() |
| 436 ->currentThread() | 436 ->currentThread() |
| 437 ->scheduler() | 437 ->scheduler() |
| 438 ->createWebViewScheduler(this) | 438 ->createWebViewScheduler(this, this) |
| 439 .release())), | 439 .release())), |
| 440 m_lastFrameTimeMonotonic(0), | 440 m_lastFrameTimeMonotonic(0), |
| 441 m_overrideCompositorVisibility(false) { | 441 m_overrideCompositorVisibility(false) { |
| 442 Page::PageClients pageClients; | 442 Page::PageClients pageClients; |
| 443 pageClients.chromeClient = m_chromeClientImpl.get(); | 443 pageClients.chromeClient = m_chromeClientImpl.get(); |
| 444 pageClients.contextMenuClient = &m_contextMenuClientImpl; | 444 pageClients.contextMenuClient = &m_contextMenuClientImpl; |
| 445 pageClients.editorClient = &m_editorClientImpl; | 445 pageClients.editorClient = &m_editorClientImpl; |
| 446 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; | 446 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; |
| 447 | 447 |
| 448 m_page = Page::createOrdinary(pageClients); | 448 m_page = Page::createOrdinary(pageClients); |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 page()->acceptLanguagesChanged(); | 1091 page()->acceptLanguagesChanged(); |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 void WebViewImpl::ReportIntervention(const WebString& message) { | 1094 void WebViewImpl::ReportIntervention(const WebString& message) { |
| 1095 if (!mainFrame()) | 1095 if (!mainFrame()) |
| 1096 return; | 1096 return; |
| 1097 WebConsoleMessage consoleMessage(WebConsoleMessage::LevelWarning, message); | 1097 WebConsoleMessage consoleMessage(WebConsoleMessage::LevelWarning, message); |
| 1098 mainFrame()->addMessageToConsole(consoleMessage); | 1098 mainFrame()->addMessageToConsole(consoleMessage); |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 float WebViewImpl::expensiveBackgroundThrottlingCPUBudget() { |
| 1102 return settingsImpl()->expensiveBackgroundThrottlingCPUBudget(); |
| 1103 } |
| 1104 |
| 1105 float WebViewImpl::expensiveBackgroundThrottlingInitialBudget() { |
| 1106 return settingsImpl()->expensiveBackgroundThrottlingInitialBudget(); |
| 1107 } |
| 1108 |
| 1109 float WebViewImpl::expensiveBackgroundThrottlingMaxBudget() { |
| 1110 return settingsImpl()->expensiveBackgroundThrottlingMaxBudget(); |
| 1111 } |
| 1112 |
| 1113 float WebViewImpl::expensiveBackgroundThrottlingMaxDelay() { |
| 1114 return settingsImpl()->expensiveBackgroundThrottlingMaxDelay(); |
| 1115 } |
| 1116 |
| 1101 WebInputEventResult WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) { | 1117 WebInputEventResult WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) { |
| 1102 DCHECK((event.type == WebInputEvent::RawKeyDown) || | 1118 DCHECK((event.type == WebInputEvent::RawKeyDown) || |
| 1103 (event.type == WebInputEvent::KeyDown) || | 1119 (event.type == WebInputEvent::KeyDown) || |
| 1104 (event.type == WebInputEvent::KeyUp)); | 1120 (event.type == WebInputEvent::KeyUp)); |
| 1105 TRACE_EVENT2("input", "WebViewImpl::handleKeyEvent", "type", | 1121 TRACE_EVENT2("input", "WebViewImpl::handleKeyEvent", "type", |
| 1106 WebInputEvent::GetName(event.type), "text", | 1122 WebInputEvent::GetName(event.type), "text", |
| 1107 String(event.text).utf8()); | 1123 String(event.text).utf8()); |
| 1108 | 1124 |
| 1109 // Halt an in-progress fling on a key event. | 1125 // Halt an in-progress fling on a key event. |
| 1110 endActiveFlingAnimation(); | 1126 endActiveFlingAnimation(); |
| (...skipping 3329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4440 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4456 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4441 return nullptr; | 4457 return nullptr; |
| 4442 return focusedFrame; | 4458 return focusedFrame; |
| 4443 } | 4459 } |
| 4444 | 4460 |
| 4445 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4461 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4446 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4462 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4447 } | 4463 } |
| 4448 | 4464 |
| 4449 } // namespace blink | 4465 } // namespace blink |
| OLD | NEW |