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