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

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

Issue 695803003: Make clicks on <a> request a navigation (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // FrameHost currently corresponds to the Page object in core/page 52 // FrameHost currently corresponds to the Page object in core/page
53 // however the concept of a Page is moving up out of Blink. 53 // however the concept of a Page is moving up out of Blink.
54 // In an out-of-process iframe world, a single Page may have 54 // In an out-of-process iframe world, a single Page may have
55 // multiple frames in different process, thus Page becomes a 55 // multiple frames in different process, thus Page becomes a
56 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr ameHost). 56 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr ameHost).
57 // Separating Page from the rest of core/ through this indirection 57 // Separating Page from the rest of core/ through this indirection
58 // allows us to slowly refactor Page without breaking the rest of core. 58 // allows us to slowly refactor Page without breaking the rest of core.
59 class FrameHost final : public DummyBase<FrameHost> { 59 class FrameHost final : public DummyBase<FrameHost> {
60 WTF_MAKE_NONCOPYABLE(FrameHost); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 60 WTF_MAKE_NONCOPYABLE(FrameHost); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
61 public: 61 public:
62 static PassOwnPtr<FrameHost> create(Page&, ServiceProvider*); 62 static PassOwnPtr<FrameHost> create(Page&, ServiceProvider&);
63 ~FrameHost(); 63 ~FrameHost();
64 64
65 // Careful: This function will eventually be removed. 65 // Careful: This function will eventually be removed.
66 Page& page() const { return *m_page; } 66 Page& page() const { return *m_page; }
67 Settings& settings() const; 67 Settings& settings() const;
68 Chrome& chrome() const; 68 Chrome& chrome() const;
69 UseCounter& useCounter() const; 69 UseCounter& useCounter() const;
70 70
71 ServiceProvider* services() const { return m_services; } 71 ServiceProvider& services() const { return m_services; }
72 72
73 // Corresponds to pixel density of the device where this Page is 73 // Corresponds to pixel density of the device where this Page is
74 // being displayed. In multi-monitor setups this can vary between pages. 74 // 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. 75 // This value does not account for Page zoom, use LocalFrame::devicePixelRat io instead.
76 float deviceScaleFactor() const; 76 float deviceScaleFactor() const;
77 77
78 EventHandlerRegistry& eventHandlerRegistry() const; 78 EventHandlerRegistry& eventHandlerRegistry() const;
79 79
80 void trace(Visitor*); 80 void trace(Visitor*);
81 81
82 private: 82 private:
83 FrameHost(Page&, ServiceProvider*); 83 FrameHost(Page&, ServiceProvider&);
84 84
85 RawPtr<Page> m_page; 85 RawPtr<Page> m_page;
86 ServiceProvider* m_services; 86 ServiceProvider& m_services;
87 const OwnPtr<EventHandlerRegistry> m_eventHandlerRegistry; 87 const OwnPtr<EventHandlerRegistry> m_eventHandlerRegistry;
88 }; 88 };
89 89
90 } 90 }
91 91
92 #endif // FrameHost_h 92 #endif // FrameHost_h
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/frame/FrameHost.cpp » ('j') | sky/engine/core/testing/DummyPageHolder.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698