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

Side by Side Diff: chrome/browser/sessions/session_types.cc

Issue 8983010: Convert WebContents to return a content::NavigationController instead of the implementation. Upda... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/sessions/session_types.h" 5 #include "chrome/browser/sessions/session_types.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "content/browser/tab_contents/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
11 #include "content/public/browser/navigation_entry.h" 11 #include "content/public/browser/navigation_entry.h"
12 12
13 using content::NavigationEntry; 13 using content::NavigationEntry;
14 14
15 // TabNavigation -------------------------------------------------------------- 15 // TabNavigation --------------------------------------------------------------
16 16
17 TabNavigation::TabNavigation() 17 TabNavigation::TabNavigation()
18 : transition_(content::PAGE_TRANSITION_TYPED), 18 : transition_(content::PAGE_TRANSITION_TYPED),
19 type_mask_(0), 19 type_mask_(0),
20 index_(-1) { 20 index_(-1) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 state_ = tab.state_; 55 state_ = tab.state_;
56 transition_ = tab.transition_; 56 transition_ = tab.transition_;
57 type_mask_ = tab.type_mask_; 57 type_mask_ = tab.type_mask_;
58 index_ = tab.index_; 58 index_ = tab.index_;
59 return *this; 59 return *this;
60 } 60 }
61 61
62 // static 62 // static
63 NavigationEntry* TabNavigation::ToNavigationEntry( 63 NavigationEntry* TabNavigation::ToNavigationEntry(
64 int page_id, Profile *profile) const { 64 int page_id, Profile *profile) const {
65 NavigationEntry* entry = NavigationController::CreateNavigationEntry( 65 NavigationEntry* entry = content::NavigationController::CreateNavigationEntry(
66 virtual_url_, 66 virtual_url_,
67 referrer_, 67 referrer_,
68 // Use a transition type of reload so that we don't incorrectly 68 // Use a transition type of reload so that we don't incorrectly
69 // increase the typed count. 69 // increase the typed count.
70 content::PAGE_TRANSITION_RELOAD, 70 content::PAGE_TRANSITION_RELOAD,
71 false, 71 false,
72 // The extra headers are not sync'ed across sessions. 72 // The extra headers are not sync'ed across sessions.
73 std::string(), 73 std::string(),
74 profile); 74 profile);
75 75
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 SessionWindow::SessionWindow() 118 SessionWindow::SessionWindow()
119 : selected_tab_index(-1), 119 : selected_tab_index(-1),
120 type(Browser::TYPE_TABBED), 120 type(Browser::TYPE_TABBED),
121 is_constrained(true), 121 is_constrained(true),
122 show_state(ui::SHOW_STATE_DEFAULT) { 122 show_state(ui::SHOW_STATE_DEFAULT) {
123 } 123 }
124 124
125 SessionWindow::~SessionWindow() { 125 SessionWindow::~SessionWindow() {
126 STLDeleteElements(&tabs); 126 STLDeleteElements(&tabs);
127 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698