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 4437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4448 if (!content.isValid()) | 4448 if (!content.isValid()) |
4449 return false; | 4449 return false; |
4450 | 4450 |
4451 // This code is called directly after hit test code, with no user code runni
ng in between, | 4451 // This code is called directly after hit test code, with no user code runni
ng in between, |
4452 // thus it is assumed that the frame pointer is non-null. | 4452 // thus it is assumed that the frame pointer is non-null. |
4453 bool isMainFrame = node ? node->document().frame()->isMainFrame() : true; | 4453 bool isMainFrame = node ? node->document().frame()->isMainFrame() : true; |
4454 m_client->scheduleContentIntent(content.intent(), isMainFrame); | 4454 m_client->scheduleContentIntent(content.intent(), isMainFrame); |
4455 return true; | 4455 return true; |
4456 } | 4456 } |
4457 | 4457 |
| 4458 WebViewScheduler* WebViewImpl::scheduler() const |
| 4459 { |
| 4460 return m_scheduler.get(); |
| 4461 } |
| 4462 |
4458 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, | 4463 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
4459 bool isInitialState) { | 4464 bool isInitialState) { |
4460 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrere
nder); | 4465 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrere
nder); |
4461 | 4466 |
4462 if (page()) | 4467 if (page()) |
4463 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<
int>(visibilityState)), isInitialState); | 4468 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<
int>(visibilityState)), isInitialState); |
4464 | 4469 |
4465 bool visible = visibilityState == WebPageVisibilityStateVisible; | 4470 bool visible = visibilityState == WebPageVisibilityStateVisible; |
4466 if (m_layerTreeView) | 4471 if (m_layerTreeView) |
4467 m_layerTreeView->setVisible(visible); | 4472 m_layerTreeView->setVisible(visible); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4569 { | 4574 { |
4570 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4575 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4571 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4576 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4572 if (!page()) | 4577 if (!page()) |
4573 return 1; | 4578 return 1; |
4574 | 4579 |
4575 return page()->deviceScaleFactor(); | 4580 return page()->deviceScaleFactor(); |
4576 } | 4581 } |
4577 | 4582 |
4578 } // namespace blink | 4583 } // namespace blink |
OLD | NEW |