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

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1467123003: Create base class for common functionality of Web{Local,Remote}Frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698