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

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

Powered by Google App Engine
This is Rietveld 408576698