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

Side by Side Diff: Source/core/frame/FrameHost.h

Issue 898593002: DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed assertion Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/frame/FrameHost.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
36 #include "wtf/FastAllocBase.h" 36 #include "wtf/FastAllocBase.h"
37 #include "wtf/Noncopyable.h" 37 #include "wtf/Noncopyable.h"
38 #include "wtf/OwnPtr.h" 38 #include "wtf/OwnPtr.h"
39 #include "wtf/PassOwnPtr.h" 39 #include "wtf/PassOwnPtr.h"
40 40
41 namespace blink { 41 namespace blink {
42 42
43 class Chrome; 43 class Chrome;
44 class ConsoleMessageStorage; 44 class ConsoleMessageStorage;
45 class EventHandlerRegistry; 45 class EventHandlerRegistry;
46 class InstrumentingAgents;
46 class Page; 47 class Page;
47 class PinchViewport; 48 class PinchViewport;
48 class Settings; 49 class Settings;
49 class UseCounter; 50 class UseCounter;
50 class Visitor; 51 class Visitor;
51 52
52 // FrameHost is the set of global data shared between multiple frames 53 // FrameHost is the set of global data shared between multiple frames
53 // and is provided by the embedder to each frame when created. 54 // and is provided by the embedder to each frame when created.
54 // FrameHost currently corresponds to the Page object in core/page 55 // FrameHost currently corresponds to the Page object in core/page
55 // however the concept of a Page is moving up out of Blink. 56 // however the concept of a Page is moving up out of Blink.
56 // In an out-of-process iframe world, a single Page may have 57 // In an out-of-process iframe world, a single Page may have
57 // multiple frames in different process, thus Page becomes a 58 // multiple frames in different process, thus Page becomes a
58 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr ameHost). 59 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr ameHost).
59 // Separating Page from the rest of core/ through this indirection 60 // Separating Page from the rest of core/ through this indirection
60 // allows us to slowly refactor Page without breaking the rest of core. 61 // allows us to slowly refactor Page without breaking the rest of core.
61 class FrameHost final : public NoBaseWillBeGarbageCollectedFinalized<FrameHost> { 62 class FrameHost final : public NoBaseWillBeGarbageCollectedFinalized<FrameHost> {
62 WTF_MAKE_NONCOPYABLE(FrameHost); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 63 WTF_MAKE_NONCOPYABLE(FrameHost); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
63 public: 64 public:
64 static PassOwnPtrWillBeRawPtr<FrameHost> create(Page&); 65 static PassOwnPtrWillBeRawPtr<FrameHost> create(Page&);
65 ~FrameHost(); 66 ~FrameHost();
66 67
67 // Careful: This function will eventually be removed. 68 // Careful: This function will eventually be removed.
68 Page& page() const { return *m_page; } 69 Page& page() const { return *m_page; }
69 Settings& settings() const; 70 Settings& settings() const;
70 Chrome& chrome() const; 71 Chrome& chrome() const;
71 UseCounter& useCounter() const; 72 UseCounter& useCounter() const;
73 InstrumentingAgents* instrumentingAgents() const;
72 74
73 // Corresponds to pixel density of the device where this Page is 75 // Corresponds to pixel density of the device where this Page is
74 // being displayed. In multi-monitor setups this can vary between pages. 76 // being displayed. In multi-monitor setups this can vary between pages.
75 // This value does not account for Page zoom, use LocalFrame::devicePixelRat io instead. 77 // This value does not account for Page zoom, use LocalFrame::devicePixelRat io instead.
76 float deviceScaleFactor() const; 78 float deviceScaleFactor() const;
77 79
78 PinchViewport& pinchViewport() const; 80 PinchViewport& pinchViewport() const;
79 EventHandlerRegistry& eventHandlerRegistry() const; 81 EventHandlerRegistry& eventHandlerRegistry() const;
80 82
81 const AtomicString& overrideEncoding() const { return m_overrideEncoding; } 83 const AtomicString& overrideEncoding() const { return m_overrideEncoding; }
(...skipping 20 matching lines...) Expand all
102 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; 104 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry;
103 const OwnPtrWillBeMember<ConsoleMessageStorage> m_consoleMessageStorage; 105 const OwnPtrWillBeMember<ConsoleMessageStorage> m_consoleMessageStorage;
104 106
105 AtomicString m_overrideEncoding; 107 AtomicString m_overrideEncoding;
106 int m_subframeCount; 108 int m_subframeCount;
107 }; 109 };
108 110
109 } 111 }
110 112
111 #endif // FrameHost_h 113 #endif // FrameHost_h
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/frame/FrameHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698