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

Side by Side Diff: sky/engine/core/frame/FrameHost.h

Issue 878673005: Get rid of Chrome, use Page. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/frame/FrameConsole.cpp ('k') | sky/engine/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 21 matching lines...) Expand all
32 #define SKY_ENGINE_CORE_FRAME_FRAMEHOST_H_ 32 #define SKY_ENGINE_CORE_FRAME_FRAMEHOST_H_
33 33
34 #include "sky/engine/platform/heap/Handle.h" 34 #include "sky/engine/platform/heap/Handle.h"
35 #include "sky/engine/wtf/FastAllocBase.h" 35 #include "sky/engine/wtf/FastAllocBase.h"
36 #include "sky/engine/wtf/Noncopyable.h" 36 #include "sky/engine/wtf/Noncopyable.h"
37 #include "sky/engine/wtf/OwnPtr.h" 37 #include "sky/engine/wtf/OwnPtr.h"
38 #include "sky/engine/wtf/PassOwnPtr.h" 38 #include "sky/engine/wtf/PassOwnPtr.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class Chrome;
43 class Page; 42 class Page;
44 class ServiceProvider; 43 class ServiceProvider;
45 class Settings; 44 class Settings;
46 45
47 // FrameHost is the set of global data shared between multiple frames 46 // FrameHost is the set of global data shared between multiple frames
48 // and is provided by the embedder to each frame when created. 47 // and is provided by the embedder to each frame when created.
49 // FrameHost currently corresponds to the Page object in core/page 48 // FrameHost currently corresponds to the Page object in core/page
50 // however the concept of a Page is moving up out of Blink. 49 // however the concept of a Page is moving up out of Blink.
51 // In an out-of-process iframe world, a single Page may have 50 // In an out-of-process iframe world, a single Page may have
52 // multiple frames in different process, thus Page becomes a 51 // multiple frames in different process, thus Page becomes a
53 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr ameHost). 52 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr ameHost).
54 // Separating Page from the rest of core/ through this indirection 53 // Separating Page from the rest of core/ through this indirection
55 // allows us to slowly refactor Page without breaking the rest of core. 54 // allows us to slowly refactor Page without breaking the rest of core.
56 class FrameHost final { 55 class FrameHost final {
57 WTF_MAKE_NONCOPYABLE(FrameHost); WTF_MAKE_FAST_ALLOCATED; 56 WTF_MAKE_NONCOPYABLE(FrameHost); WTF_MAKE_FAST_ALLOCATED;
58 public: 57 public:
59 static PassOwnPtr<FrameHost> create(Page&, ServiceProvider&); 58 static PassOwnPtr<FrameHost> create(Page&, ServiceProvider&);
60 ~FrameHost(); 59 ~FrameHost();
61 60
62 // Careful: This function will eventually be removed. 61 // Careful: This function will eventually be removed.
63 Page& page() const { return *m_page; } 62 Page& page() const { return *m_page; }
64 Settings& settings() const; 63 Settings& settings() const;
65 Chrome& chrome() const;
66 64
67 ServiceProvider& services() const { return m_services; } 65 ServiceProvider& services() const { return m_services; }
68 66
69 // Corresponds to pixel density of the device where this Page is 67 // Corresponds to pixel density of the device where this Page is
70 // being displayed. In multi-monitor setups this can vary between pages. 68 // being displayed. In multi-monitor setups this can vary between pages.
71 // This value does not account for Page zoom, use LocalFrame::devicePixelRat io instead. 69 // This value does not account for Page zoom, use LocalFrame::devicePixelRat io instead.
72 float deviceScaleFactor() const; 70 float deviceScaleFactor() const;
73 71
74 private: 72 private:
75 FrameHost(Page&, ServiceProvider&); 73 FrameHost(Page&, ServiceProvider&);
76 74
77 Page* m_page; 75 Page* m_page;
78 ServiceProvider& m_services; 76 ServiceProvider& m_services;
79 }; 77 };
80 78
81 } 79 }
82 80
83 #endif // SKY_ENGINE_CORE_FRAME_FRAMEHOST_H_ 81 #endif // SKY_ENGINE_CORE_FRAME_FRAMEHOST_H_
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameConsole.cpp ('k') | sky/engine/core/frame/FrameHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698