| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 return static_cast<int>(m_printContext->pageCount()); | 1386 return static_cast<int>(m_printContext->pageCount()); |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 float WebLocalFrameImpl::getPrintPageShrink(int page) { | 1389 float WebLocalFrameImpl::getPrintPageShrink(int page) { |
| 1390 DCHECK(m_printContext); | 1390 DCHECK(m_printContext); |
| 1391 DCHECK_GE(page, 0); | 1391 DCHECK_GE(page, 0); |
| 1392 return m_printContext->getPageShrink(page); | 1392 return m_printContext->getPageShrink(page); |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 float WebLocalFrameImpl::printPage(int page, WebCanvas* canvas) { | 1395 float WebLocalFrameImpl::printPage(int page, WebCanvas* canvas) { |
| 1396 #if ENABLE(PRINTING) | |
| 1397 DCHECK(m_printContext); | 1396 DCHECK(m_printContext); |
| 1398 DCHECK_GE(page, 0); | 1397 DCHECK_GE(page, 0); |
| 1399 DCHECK(frame()); | 1398 DCHECK(frame()); |
| 1400 DCHECK(frame()->document()); | 1399 DCHECK(frame()->document()); |
| 1401 | 1400 |
| 1402 return m_printContext->spoolSinglePage(canvas, page); | 1401 return m_printContext->spoolSinglePage(canvas, page); |
| 1403 #else | |
| 1404 return 0; | |
| 1405 #endif | |
| 1406 } | 1402 } |
| 1407 | 1403 |
| 1408 void WebLocalFrameImpl::printEnd() { | 1404 void WebLocalFrameImpl::printEnd() { |
| 1409 DCHECK(m_printContext); | 1405 DCHECK(m_printContext); |
| 1410 m_printContext->end(); | 1406 m_printContext->end(); |
| 1411 m_printContext.clear(); | 1407 m_printContext.clear(); |
| 1412 } | 1408 } |
| 1413 | 1409 |
| 1414 bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node) { | 1410 bool WebLocalFrameImpl::isPrintScalingDisabledForPlugin(const WebNode& node) { |
| 1415 WebPluginContainerImpl* pluginContainer = | 1411 WebPluginContainerImpl* pluginContainer = |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2391 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2387 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2392 } else if (metric == "wasAlternateProtocolAvailable") { | 2388 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2393 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2389 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2394 } else if (metric == "connectionInfo") { | 2390 } else if (metric == "connectionInfo") { |
| 2395 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2391 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2396 } | 2392 } |
| 2397 UseCounter::count(frame(), feature); | 2393 UseCounter::count(frame(), feature); |
| 2398 } | 2394 } |
| 2399 | 2395 |
| 2400 } // namespace blink | 2396 } // namespace blink |
| OLD | NEW |