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

Side by Side Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2724543002: Renamed deviceScaleFactor() to deviceScaleFactorDeprecated() in Page (Closed)
Patch Set: Rebase Created 3 years, 9 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All
3 * Rights Reserved. 3 * Rights Reserved.
4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved.
5 * (http://www.torchmobile.com/) 5 * (http://www.torchmobile.com/)
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 static Page::PageSet& allPages() { 65 static Page::PageSet& allPages() {
66 DEFINE_STATIC_LOCAL(Page::PageSet, pages, ()); 66 DEFINE_STATIC_LOCAL(Page::PageSet, pages, ());
67 return pages; 67 return pages;
68 } 68 }
69 69
70 Page::PageSet& Page::ordinaryPages() { 70 Page::PageSet& Page::ordinaryPages() {
71 DEFINE_STATIC_LOCAL(Page::PageSet, pages, ()); 71 DEFINE_STATIC_LOCAL(Page::PageSet, pages, ());
72 return pages; 72 return pages;
73 } 73 }
74 74
75 float deviceScaleFactor(LocalFrame* frame) { 75 float deviceScaleFactorDeprecated(LocalFrame* frame) {
76 if (!frame) 76 if (!frame)
77 return 1; 77 return 1;
78 Page* page = frame->page(); 78 Page* page = frame->page();
79 if (!page) 79 if (!page)
80 return 1; 80 return 1;
81 return page->deviceScaleFactor(); 81 return page->deviceScaleFactorDeprecated();
82 } 82 }
83 83
84 Page* Page::createOrdinary(PageClients& pageClients) { 84 Page* Page::createOrdinary(PageClients& pageClients) {
85 Page* page = create(pageClients); 85 Page* page = create(pageClients);
86 ordinaryPages().insert(page); 86 ordinaryPages().insert(page);
87 if (ScopedPageSuspender::isActive()) 87 if (ScopedPageSuspender::isActive())
88 page->setSuspended(true); 88 page->setSuspended(true);
89 return page; 89 return page;
90 } 90 }
91 91
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 void Page::setPageScaleFactor(float scale) { 249 void Page::setPageScaleFactor(float scale) {
250 frameHost().visualViewport().setScale(scale); 250 frameHost().visualViewport().setScale(scale);
251 } 251 }
252 252
253 float Page::pageScaleFactor() const { 253 float Page::pageScaleFactor() const {
254 return frameHost().visualViewport().scale(); 254 return frameHost().visualViewport().scale();
255 } 255 }
256 256
257 void Page::setDeviceScaleFactor(float scaleFactor) { 257 void Page::setDeviceScaleFactorDeprecated(float scaleFactor) {
258 if (m_deviceScaleFactor == scaleFactor) 258 if (m_deviceScaleFactor == scaleFactor)
259 return; 259 return;
260 260
261 m_deviceScaleFactor = scaleFactor; 261 m_deviceScaleFactor = scaleFactor;
262 262
263 if (mainFrame() && mainFrame()->isLocalFrame()) 263 if (mainFrame() && mainFrame()->isLocalFrame())
264 deprecatedLocalMainFrame()->deviceScaleFactorChanged(); 264 deprecatedLocalMainFrame()->deviceScaleFactorChanged();
265 } 265 }
266 266
267 void Page::allVisitedStateChanged(bool invalidateVisitedLinkHashes) { 267 void Page::allVisitedStateChanged(bool invalidateVisitedLinkHashes) {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 : chromeClient(nullptr), 530 : chromeClient(nullptr),
531 contextMenuClient(nullptr), 531 contextMenuClient(nullptr),
532 editorClient(nullptr), 532 editorClient(nullptr),
533 spellCheckerClient(nullptr) {} 533 spellCheckerClient(nullptr) {}
534 534
535 Page::PageClients::~PageClients() {} 535 Page::PageClients::~PageClients() {}
536 536
537 template class CORE_TEMPLATE_EXPORT Supplement<Page>; 537 template class CORE_TEMPLATE_EXPORT Supplement<Page>;
538 538
539 } // namespace blink 539 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.h ('k') | third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698