Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1646583002: [Reland] Per WebViewScheduler virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4444 matching lines...) Expand 10 before | Expand all | Expand 10 after
4455 if (!content.isValid()) 4455 if (!content.isValid())
4456 return false; 4456 return false;
4457 4457
4458 // This code is called directly after hit test code, with no user code runni ng in between, 4458 // This code is called directly after hit test code, with no user code runni ng in between,
4459 // thus it is assumed that the frame pointer is non-null. 4459 // thus it is assumed that the frame pointer is non-null.
4460 bool isMainFrame = node ? node->document().frame()->isMainFrame() : true; 4460 bool isMainFrame = node ? node->document().frame()->isMainFrame() : true;
4461 m_client->scheduleContentIntent(content.intent(), isMainFrame); 4461 m_client->scheduleContentIntent(content.intent(), isMainFrame);
4462 return true; 4462 return true;
4463 } 4463 }
4464 4464
4465 WebViewScheduler* WebViewImpl::scheduler() const
4466 {
4467 return m_scheduler.get();
4468 }
4469
4465 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, 4470 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState,
4466 bool isInitialState) { 4471 bool isInitialState) {
4467 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrere nder); 4472 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden || visibilityState == WebPageVisibilityStatePrere nder);
4468 4473
4469 if (page()) 4474 if (page())
4470 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast< int>(visibilityState)), isInitialState); 4475 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast< int>(visibilityState)), isInitialState);
4471 4476
4472 bool visible = visibilityState == WebPageVisibilityStateVisible; 4477 bool visible = visibilityState == WebPageVisibilityStateVisible;
4473 if (m_layerTreeView) 4478 if (m_layerTreeView)
4474 m_layerTreeView->setVisible(visible); 4479 m_layerTreeView->setVisible(visible);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
4575 { 4580 {
4576 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4581 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4577 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4582 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4578 if (!page()) 4583 if (!page())
4579 return 1; 4584 return 1;
4580 4585
4581 return page()->deviceScaleFactor(); 4586 return page()->deviceScaleFactor();
4582 } 4587 }
4583 4588
4584 } // namespace blink 4589 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698