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

Side by Side Diff: third_party/WebKit/Source/core/css/MediaValues.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/MediaValues.h" 5 #include "core/css/MediaValues.h"
6 6
7 #include "core/css/CSSHelper.h" 7 #include "core/css/CSSHelper.h"
8 #include "core/css/MediaValuesCached.h" 8 #include "core/css/MediaValuesCached.h"
9 #include "core/css/MediaValuesDynamic.h" 9 #include "core/css/MediaValuesDynamic.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
11 #include "core/dom/Element.h" 11 #include "core/dom/Element.h"
12 #include "core/frame/FrameHost.h" 12 #include "core/frame/FrameHost.h"
13 #include "core/frame/FrameView.h" 13 #include "core/frame/FrameView.h"
14 #include "core/frame/LocalFrame.h" 14 #include "core/frame/LocalFrame.h"
15 #include "core/frame/Settings.h" 15 #include "core/frame/Settings.h"
16 #include "core/html/imports/HTMLImportsController.h" 16 #include "core/html/imports/HTMLImportsController.h"
17 #include "core/layout/LayoutObject.h" 17 #include "core/layout/LayoutObject.h"
18 #include "core/layout/api/LayoutViewItem.h" 18 #include "core/layout/api/LayoutViewItem.h"
19 #include "core/layout/compositing/PaintLayerCompositor.h" 19 #include "core/layout/compositing/PaintLayerCompositor.h"
20 #include "core/page/ChromeClient.h" 20 #include "core/page/ChromeClient.h"
21 #include "core/page/Page.h" 21 #include "core/page/Page.h"
22 #include "core/style/ComputedStyle.h" 22 #include "core/style/ComputedStyle.h"
23 #include "public/platform/WebScreenInfo.h" 23 #include "public/platform/WebScreenInfo.h"
24 24
25 namespace blink { 25 namespace blink {
26 26
27 RawPtr<MediaValues> MediaValues::createDynamicIfFrameExists(LocalFrame* frame) 27 MediaValues* MediaValues::createDynamicIfFrameExists(LocalFrame* frame)
28 { 28 {
29 if (frame) 29 if (frame)
30 return MediaValuesDynamic::create(frame); 30 return MediaValuesDynamic::create(frame);
31 return MediaValuesCached::create(); 31 return MediaValuesCached::create();
32 } 32 }
33 33
34 double MediaValues::calculateViewportWidth(LocalFrame* frame) 34 double MediaValues::calculateViewportWidth(LocalFrame* frame)
35 { 35 {
36 ASSERT(frame && frame->view() && frame->document()); 36 ASSERT(frame && frame->view() && frame->document());
37 int viewportWidth = frame->view()->layoutSize(IncludeScrollbars).width(); 37 int viewportWidth = frame->view()->layoutSize(IncludeScrollbars).width();
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 LocalFrame* MediaValues::frameFrom(Document& document) 219 LocalFrame* MediaValues::frameFrom(Document& document)
220 { 220 {
221 Document* executingDocument = document.importsController() ? document.import sController()->master() : &document; 221 Document* executingDocument = document.importsController() ? document.import sController()->master() : &document;
222 ASSERT(executingDocument); 222 ASSERT(executingDocument);
223 return executingDocument->frame(); 223 return executingDocument->frame();
224 } 224 }
225 225
226 } // namespace blink 226 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaValues.h ('k') | third_party/WebKit/Source/core/css/MediaValuesCached.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698