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 4501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4512 if (!content.isValid()) | 4512 if (!content.isValid()) |
4513 return false; | 4513 return false; |
4514 | 4514 |
4515 // This code is called directly after hit test code, with no user code runni
ng in between, | 4515 // This code is called directly after hit test code, with no user code runni
ng in between, |
4516 // thus it is assumed that the frame pointer is non-null. | 4516 // thus it is assumed that the frame pointer is non-null. |
4517 bool isMainFrame = node ? node->document().frame()->isMainFrame() : true; | 4517 bool isMainFrame = node ? node->document().frame()->isMainFrame() : true; |
4518 m_client->scheduleContentIntent(content.intent(), isMainFrame); | 4518 m_client->scheduleContentIntent(content.intent(), isMainFrame); |
4519 return true; | 4519 return true; |
4520 } | 4520 } |
4521 | 4521 |
| 4522 WebViewScheduler* WebViewImpl::scheduler() const |
| 4523 { |
| 4524 return m_scheduler.get(); |
| 4525 } |
| 4526 |
4522 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, | 4527 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
4523 bool isInitialState) { | 4528 bool isInitialState) { |
4524 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrere
nder); | 4529 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrere
nder); |
4525 | 4530 |
4526 if (page()) | 4531 if (page()) |
4527 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<
int>(visibilityState)), isInitialState); | 4532 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<
int>(visibilityState)), isInitialState); |
4528 | 4533 |
4529 bool visible = visibilityState == WebPageVisibilityStateVisible; | 4534 bool visible = visibilityState == WebPageVisibilityStateVisible; |
4530 if (m_layerTreeView) | 4535 if (m_layerTreeView) |
4531 m_layerTreeView->setVisible(visible); | 4536 m_layerTreeView->setVisible(visible); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4633 { | 4638 { |
4634 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4639 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4635 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4640 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4636 if (!page()) | 4641 if (!page()) |
4637 return 1; | 4642 return 1; |
4638 | 4643 |
4639 return page()->deviceScaleFactor(); | 4644 return page()->deviceScaleFactor(); |
4640 } | 4645 } |
4641 | 4646 |
4642 } // namespace blink | 4647 } // namespace blink |
OLD | NEW |