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

Side by Side Diff: Source/web/RemoteBridgeFrameOwner.h

Issue 1319863006: (blink) Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments + static_cast for enum conversion Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found 2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file. 3 // in the LICENSE file.
4 4
5 #ifndef RemoteBridgeFrameOwner_h 5 #ifndef RemoteBridgeFrameOwner_h
6 #define RemoteBridgeFrameOwner_h 6 #define RemoteBridgeFrameOwner_h
7 7
8 #include "core/frame/FrameOwner.h" 8 #include "core/frame/FrameOwner.h"
9 #include "platform/scroll/ScrollTypes.h"
9 #include "web/WebLocalFrameImpl.h" 10 #include "web/WebLocalFrameImpl.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 // Helper class to bridge communication for a frame with a remote parent. 14 // Helper class to bridge communication for a frame with a remote parent.
14 // Currently, it serves two purposes: 15 // Currently, it serves two purposes:
15 // 1. Allows the local frame's loader to retrieve sandbox flags associated with 16 // 1. Allows the local frame's loader to retrieve sandbox flags associated with
16 // its owner element in another process. 17 // its owner element in another process.
17 // 2. Trigger a load event on its owner element once it finishes a load. 18 // 2. Trigger a load event on its owner element once it finishes a load.
18 class RemoteBridgeFrameOwner final : public NoBaseWillBeGarbageCollectedFinalize d<RemoteBridgeFrameOwner>, public FrameOwner { 19 class RemoteBridgeFrameOwner final : public NoBaseWillBeGarbageCollectedFinalize d<RemoteBridgeFrameOwner>, public FrameOwner {
(...skipping 24 matching lines...) Expand all
43 m_frame = frame; 44 m_frame = frame;
44 } 45 }
45 46
46 void dispatchLoad() override; 47 void dispatchLoad() override;
47 48
48 void renderFallbackContent() override 49 void renderFallbackContent() override
49 { 50 {
50 // TODO(dcheng): Implement. 51 // TODO(dcheng): Implement.
51 } 52 }
52 53
54 void setScrollingMode(ScrollbarMode mode) { m_scrolling = mode; }
55 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; }
56 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; }
57
58 ScrollbarMode scrollingMode() const override { return m_scrolling; }
59 int marginWidth() const override { return m_marginWidth; }
60 int marginHeight() const override { return m_marginHeight; }
61
53 DECLARE_VIRTUAL_TRACE(); 62 DECLARE_VIRTUAL_TRACE();
54 63
55 private: 64 private:
56 RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl>, SandboxFla gs); 65 RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl>, SandboxFla gs);
57 66
58 RefPtrWillBeMember<WebLocalFrameImpl> m_frame; 67 RefPtrWillBeMember<WebLocalFrameImpl> m_frame;
59 SandboxFlags m_sandboxFlags; 68 SandboxFlags m_sandboxFlags;
69 ScrollbarMode m_scrolling;
70 int m_marginWidth;
71 int m_marginHeight;
60 }; 72 };
61 73
62 DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(), !owner.isLocal()); 74 DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(), !owner.isLocal());
63 75
64 } // namespace blink 76 } // namespace blink
65 77
66 #endif // RemoteBridgeFrameOwner_h 78 #endif // RemoteBridgeFrameOwner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698