| OLD | NEW |
| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // 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. |
| 50 // 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 |
| 51 // multiple frames in different process, thus Page becomes a | 51 // multiple frames in different process, thus Page becomes a |
| 52 // 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). |
| 53 // Separating Page from the rest of core/ through this indirection | 53 // Separating Page from the rest of core/ through this indirection |
| 54 // 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. |
| 55 class FrameHost final { | 55 class FrameHost final { |
| 56 WTF_MAKE_NONCOPYABLE(FrameHost); WTF_MAKE_FAST_ALLOCATED; | 56 WTF_MAKE_NONCOPYABLE(FrameHost); WTF_MAKE_FAST_ALLOCATED; |
| 57 public: | 57 public: |
| 58 static PassOwnPtr<FrameHost> create(Page&, ServiceProvider*); | 58 static PassOwnPtr<FrameHost> create(Page&, ServiceProvider*); |
| 59 static PassOwnPtr<FrameHost> createDummy(Settings*); |
| 60 |
| 59 ~FrameHost(); | 61 ~FrameHost(); |
| 60 | 62 |
| 61 // Careful: This function will eventually be removed. | 63 // Careful: This function will eventually be removed. |
| 62 Page& page() const { return *m_page; } | 64 Page& page() const { return *m_page; } |
| 63 Settings& settings() const; | 65 Settings& settings() const; |
| 64 | 66 |
| 65 ServiceProvider* services() const { return m_services; } | 67 ServiceProvider* services() const { return m_services; } |
| 66 | 68 |
| 67 // Corresponds to pixel density of the device where this Page is | 69 // Corresponds to pixel density of the device where this Page is |
| 68 // being displayed. In multi-monitor setups this can vary between pages. | 70 // being displayed. In multi-monitor setups this can vary between pages. |
| 69 // This value does not account for Page zoom, use LocalFrame::devicePixelRat
io instead. | 71 // This value does not account for Page zoom, use LocalFrame::devicePixelRat
io instead. |
| 70 float deviceScaleFactor() const; | 72 float deviceScaleFactor() const; |
| 71 | 73 |
| 72 private: | 74 private: |
| 73 FrameHost(Page&, ServiceProvider*); | 75 FrameHost(Page&, ServiceProvider*); |
| 76 FrameHost(Settings*); |
| 74 | 77 |
| 75 Page* m_page; | 78 Page* m_page; |
| 76 ServiceProvider* m_services; | 79 ServiceProvider* m_services; |
| 80 Settings* m_settings; |
| 77 }; | 81 }; |
| 78 | 82 |
| 79 } | 83 } |
| 80 | 84 |
| 81 #endif // SKY_ENGINE_CORE_FRAME_FRAMEHOST_H_ | 85 #endif // SKY_ENGINE_CORE_FRAME_FRAMEHOST_H_ |
| OLD | NEW |