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

Side by Side Diff: content/renderer/history_entry.cc

Issue 547093002: Return WebLocalFrame from RenderFrame::GetWebFrame(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « content/renderer/history_controller.cc ('k') | content/renderer/image_loading_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 19 matching lines...) Expand all
30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 30 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36 #include "content/renderer/history_entry.h" 36 #include "content/renderer/history_entry.h"
37 37
38 #include "content/renderer/render_frame_impl.h" 38 #include "content/renderer/render_frame_impl.h"
39 #include "content/renderer/render_view_impl.h" 39 #include "content/renderer/render_view_impl.h"
40 #include "third_party/WebKit/public/web/WebFrame.h" 40 #include "third_party/WebKit/public/web/WebLocalFrame.h"
41 41
42 using blink::WebFrame; 42 using blink::WebFrame;
43 using blink::WebHistoryItem; 43 using blink::WebHistoryItem;
44 44
45 namespace content { 45 namespace content {
46 46
47 // Frame routing ids are not safe to serialize, so instead create a mapping 47 // Frame routing ids are not safe to serialize, so instead create a mapping
48 // from routing ids to frame sequence numbers. The sequence numbers can be 48 // from routing ids to frame sequence numbers. The sequence numbers can be
49 // benignly serialized with limited risk of collision in a different process. 49 // benignly serialized with limited risk of collision in a different process.
50 // FrameMap is a singleton per-process. 50 // FrameMap is a singleton per-process.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return unique_names_to_items_[frame->GetWebFrame()->uniqueName().utf8()]; 201 return unique_names_to_items_[frame->GetWebFrame()->uniqueName().utf8()];
202 } 202 }
203 203
204 WebHistoryItem HistoryEntry::GetItemForFrame(RenderFrameImpl* frame) { 204 WebHistoryItem HistoryEntry::GetItemForFrame(RenderFrameImpl* frame) {
205 if (HistoryNode* history_node = GetHistoryNodeForFrame(frame)) 205 if (HistoryNode* history_node = GetHistoryNodeForFrame(frame))
206 return history_node->item(); 206 return history_node->item();
207 return WebHistoryItem(); 207 return WebHistoryItem();
208 } 208 }
209 209
210 } // namespace content 210 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/history_controller.cc ('k') | content/renderer/image_loading_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698