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