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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameHost.cpp

Issue 1340343003: scheduler: Implement WebFrameScheduler and WebPageScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + fixed gn build. Created 5 years, 2 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/frame/FrameHost.h" 32 #include "core/frame/FrameHost.h"
33 33
34 #include "core/frame/EventHandlerRegistry.h" 34 #include "core/frame/EventHandlerRegistry.h"
35 #include "core/frame/FrameView.h" 35 #include "core/frame/FrameView.h"
36 #include "core/frame/TopControls.h" 36 #include "core/frame/TopControls.h"
37 #include "core/inspector/ConsoleMessageStorage.h" 37 #include "core/inspector/ConsoleMessageStorage.h"
38 #include "core/page/Page.h" 38 #include "core/page/Page.h"
39 #include "public/platform/Platform.h"
40 #include "public/platform/WebFrameHostScheduler.h"
41 #include "public/platform/WebScheduler.h"
39 42
40 namespace blink { 43 namespace blink {
41 44
42 PassOwnPtrWillBeRawPtr<FrameHost> FrameHost::create(Page& page) 45 PassOwnPtrWillBeRawPtr<FrameHost> FrameHost::create(Page& page)
43 { 46 {
44 return adoptPtrWillBeNoop(new FrameHost(page)); 47 return adoptPtrWillBeNoop(new FrameHost(page));
45 } 48 }
46 49
47 FrameHost::FrameHost(Page& page) 50 FrameHost::FrameHost(Page& page)
48 : m_page(&page) 51 : m_page(&page)
49 , m_topControls(TopControls::create(*this)) 52 , m_topControls(TopControls::create(*this))
50 , m_pageScaleConstraintsSet(PageScaleConstraintsSet::create()) 53 , m_pageScaleConstraintsSet(PageScaleConstraintsSet::create())
51 , m_visualViewport(VisualViewport::create(*this)) 54 , m_visualViewport(VisualViewport::create(*this))
52 , m_eventHandlerRegistry(adoptPtrWillBeNoop(new EventHandlerRegistry(*this)) ) 55 , m_eventHandlerRegistry(adoptPtrWillBeNoop(new EventHandlerRegistry(*this)) )
53 , m_consoleMessageStorage(ConsoleMessageStorage::create()) 56 , m_consoleMessageStorage(ConsoleMessageStorage::create())
57 , m_frameHostScheduler(adoptPtr(Platform::current()->currentThread()->schedu ler()->createFrameHostScheduler()))
54 , m_subframeCount(0) 58 , m_subframeCount(0)
55 { 59 {
56 } 60 }
57 61
58 // Explicitly in the .cpp to avoid default constructor in .h 62 // Explicitly in the .cpp to avoid default constructor in .h
59 FrameHost::~FrameHost() 63 FrameHost::~FrameHost()
60 { 64 {
61 } 65 }
62 66
63 Settings& FrameHost::settings() const 67 Settings& FrameHost::settings() const
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 175
172 FrameView* rootView = page().deprecatedLocalMainFrame()->view(); 176 FrameView* rootView = page().deprecatedLocalMainFrame()->view();
173 177
174 if (!rootView) 178 if (!rootView)
175 return; 179 return;
176 180
177 rootView->setNeedsLayout(); 181 rootView->setNeedsLayout();
178 } 182 }
179 183
180 } 184 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.h ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698