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

Side by Side Diff: webkit/glue/back_forward_list_client_impl.cc

Issue 19535: Cleanup in webkit/glue/ (Closed)
Patch Set: Created 11 years, 10 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 | « webkit/glue/back_forward_list_client_impl.h ('k') | webkit/glue/chrome_client_impl.h » ('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 (c) 2008 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "HistoryItem.h" 7 #include "HistoryItem.h"
8 #undef LOG 8 #undef LOG
9 9
10 #include "webkit/glue/back_forward_list_client_impl.h" 10 #include "webkit/glue/back_forward_list_client_impl.h"
11 #include "webkit/glue/webhistoryitem_impl.h" 11 #include "webkit/glue/webhistoryitem_impl.h"
12 #include "webkit/glue/webview_impl.h" 12 #include "webkit/glue/webview_impl.h"
13 13
14 namespace webkit_glue { 14 namespace webkit_glue {
15 15
16 BackForwardListClientImpl::BackForwardListClientImpl(WebViewImpl* webview) 16 BackForwardListClientImpl::BackForwardListClientImpl(WebViewImpl* webview)
17 : webview_(webview) { 17 : webview_(webview) {
18 } 18 }
19 19
20 BackForwardListClientImpl::~BackForwardListClientImpl() { 20 BackForwardListClientImpl::~BackForwardListClientImpl() {
21 } 21 }
22 22
23 void BackForwardListClientImpl::SetCurrentHistoryItem( 23 void BackForwardListClientImpl::SetCurrentHistoryItem(
24 WebCore::HistoryItem* item) { 24 WebCore::HistoryItem* item) {
25 previous_item_ = current_item_; 25 previous_item_ = current_item_;
26 current_item_ = item; 26 current_item_ = item;
27 } 27 }
28 28
29 WebCore::HistoryItem* BackForwardListClientImpl::GetPreviousHistoryItem() { 29 WebCore::HistoryItem* BackForwardListClientImpl::GetPreviousHistoryItem()
30 const {
30 return previous_item_.get(); 31 return previous_item_.get();
31 } 32 }
32 33
33 void BackForwardListClientImpl::addItem(PassRefPtr<WebCore::HistoryItem> item) { 34 void BackForwardListClientImpl::addItem(PassRefPtr<WebCore::HistoryItem> item) {
34 previous_item_ = current_item_; 35 previous_item_ = current_item_;
35 current_item_ = item; 36 current_item_ = item;
36 37
37 // If WebCore adds a new HistoryItem, it means this is a new navigation (ie, 38 // If WebCore adds a new HistoryItem, it means this is a new navigation (ie,
38 // not a reload or back/forward). 39 // not a reload or back/forward).
39 webview_->ObserveNewNavigation(); 40 webview_->ObserveNewNavigation();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return webview_->delegate()->GetHistoryForwardListCount(); 90 return webview_->delegate()->GetHistoryForwardListCount();
90 } 91 }
91 92
92 void BackForwardListClientImpl::close() { 93 void BackForwardListClientImpl::close() {
93 current_item_ = NULL; 94 current_item_ = NULL;
94 previous_item_ = NULL; 95 previous_item_ = NULL;
95 pending_history_item_ = NULL; 96 pending_history_item_ = NULL;
96 } 97 }
97 98
98 } // namespace webkit_glue 99 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/back_forward_list_client_impl.h ('k') | webkit/glue/chrome_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698