OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 namespace { | 115 namespace { |
116 | 116 |
117 // Convenience helper for frame tree helpers in FrameClient to reduce the amount | 117 // Convenience helper for frame tree helpers in FrameClient to reduce the amount |
118 // of null-checking boilerplate code. Since the frame tree is maintained in the | 118 // of null-checking boilerplate code. Since the frame tree is maintained in the |
119 // web/ layer, the frame tree helpers often have to deal with null WebFrames: | 119 // web/ layer, the frame tree helpers often have to deal with null WebFrames: |
120 // for example, a frame with no parent will return null for WebFrame::parent(). | 120 // for example, a frame with no parent will return null for WebFrame::parent(). |
121 // TODO(dcheng): Remove duplication between LocalFrameClientImpl and | 121 // TODO(dcheng): Remove duplication between LocalFrameClientImpl and |
122 // RemoteFrameClientImpl somehow... | 122 // RemoteFrameClientImpl somehow... |
123 Frame* ToCoreFrame(WebFrame* frame) { | 123 Frame* ToCoreFrame(WebFrame* frame) { |
124 return frame ? frame->ToImplBase()->GetFrame() : nullptr; | 124 return frame ? WebFrame::CoreFrame(frame) : nullptr; |
125 } | 125 } |
126 | 126 |
127 } // namespace | 127 } // namespace |
128 | 128 |
129 LocalFrameClientImpl::LocalFrameClientImpl(WebLocalFrameImpl* frame) | 129 LocalFrameClientImpl::LocalFrameClientImpl(WebLocalFrameImpl* frame) |
130 : web_frame_(frame) {} | 130 : web_frame_(frame) {} |
131 | 131 |
132 LocalFrameClientImpl* LocalFrameClientImpl::Create(WebLocalFrameImpl* frame) { | 132 LocalFrameClientImpl* LocalFrameClientImpl::Create(WebLocalFrameImpl* frame) { |
133 return new LocalFrameClientImpl(frame); | 133 return new LocalFrameClientImpl(frame); |
134 } | 134 } |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 void LocalFrameClientImpl::AbortClientNavigation() { | 988 void LocalFrameClientImpl::AbortClientNavigation() { |
989 if (web_frame_->Client()) | 989 if (web_frame_->Client()) |
990 web_frame_->Client()->AbortClientNavigation(); | 990 web_frame_->Client()->AbortClientNavigation(); |
991 } | 991 } |
992 | 992 |
993 TextCheckerClient& LocalFrameClientImpl::GetTextCheckerClient() const { | 993 TextCheckerClient& LocalFrameClientImpl::GetTextCheckerClient() const { |
994 return web_frame_->GetTextCheckerClient(); | 994 return web_frame_->GetTextCheckerClient(); |
995 } | 995 } |
996 | 996 |
997 } // namespace blink | 997 } // namespace blink |
OLD | NEW |