| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #include "web/WebPluginContainerImpl.h" | 101 #include "web/WebPluginContainerImpl.h" |
| 102 #include "web/WebPluginLoadObserver.h" | 102 #include "web/WebPluginLoadObserver.h" |
| 103 #include "web/WebViewImpl.h" | 103 #include "web/WebViewImpl.h" |
| 104 #include "wtf/StringExtras.h" | 104 #include "wtf/StringExtras.h" |
| 105 #include "wtf/text/CString.h" | 105 #include "wtf/text/CString.h" |
| 106 #include "wtf/text/WTFString.h" | 106 #include "wtf/text/WTFString.h" |
| 107 #include <v8.h> | 107 #include <v8.h> |
| 108 | 108 |
| 109 namespace blink { | 109 namespace blink { |
| 110 | 110 |
| 111 namespace { |
| 112 |
| 113 // Convenience helper for frame tree helpers in FrameClient to reduce the amount |
| 114 // of null-checking boilerplate code. Since the frame tree is maintained in the |
| 115 // web/ layer, the frame tree helpers often have to deal with null WebFrames: |
| 116 // for example, a frame with no parent will return null for WebFrame::parent(). |
| 117 // TODO(dcheng): Remove duplication between FrameLoaderClientImpl and |
| 118 // RemoteFrameClientImpl somehow... |
| 119 Frame* toCoreFrame(WebFrame* frame) |
| 120 { |
| 121 return frame ? frame->toImplBase()->frame() : nullptr; |
| 122 } |
| 123 |
| 124 } // namespace |
| 125 |
| 111 FrameLoaderClientImpl::FrameLoaderClientImpl(WebLocalFrameImpl* frame) | 126 FrameLoaderClientImpl::FrameLoaderClientImpl(WebLocalFrameImpl* frame) |
| 112 : m_webFrame(frame) | 127 : m_webFrame(frame) |
| 113 { | 128 { |
| 114 } | 129 } |
| 115 | 130 |
| 116 PassOwnPtrWillBeRawPtr<FrameLoaderClientImpl> FrameLoaderClientImpl::create(WebL
ocalFrameImpl* frame) | 131 PassOwnPtrWillBeRawPtr<FrameLoaderClientImpl> FrameLoaderClientImpl::create(WebL
ocalFrameImpl* frame) |
| 117 { | 132 { |
| 118 return adoptPtrWillBeNoop(new FrameLoaderClientImpl(frame)); | 133 return adoptPtrWillBeNoop(new FrameLoaderClientImpl(frame)); |
| 119 } | 134 } |
| 120 | 135 |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 | 1000 |
| 986 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 1001 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
| 987 { | 1002 { |
| 988 if (m_webFrame->client()) { | 1003 if (m_webFrame->client()) { |
| 989 m_webFrame->client()->suddenTerminationDisablerChanged( | 1004 m_webFrame->client()->suddenTerminationDisablerChanged( |
| 990 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 1005 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
| 991 } | 1006 } |
| 992 } | 1007 } |
| 993 | 1008 |
| 994 } // namespace blink | 1009 } // namespace blink |
| OLD | NEW |