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

Side by Side Diff: chrome/browser/ui/browser_tab_strip_model_delegate.cc

Issue 2894973002: Provide WebContents::CreateParams to tab helpers. (Closed)
Patch Set: rebase Created 3 years, 7 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 | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/tab_helpers.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/browser_tab_strip_model_delegate.h" 5 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // TODO(beng): find a better way of doing this. 79 // TODO(beng): find a better way of doing this.
80 static_cast<content::WebContentsDelegate*>(browser)-> 80 static_cast<content::WebContentsDelegate*>(browser)->
81 LoadingStateChanged(item.web_contents, true); 81 LoadingStateChanged(item.web_contents, true);
82 } 82 }
83 83
84 return browser; 84 return browser;
85 } 85 }
86 86
87 void BrowserTabStripModelDelegate::WillAddWebContents( 87 void BrowserTabStripModelDelegate::WillAddWebContents(
88 content::WebContents* contents) { 88 content::WebContents* contents) {
89 TabHelpers::AttachTabHelpers(contents); 89 TabHelpers::AttachTabHelpers(contents, base::nullopt);
90 90
91 // Make the tab show up in the task manager. 91 // Make the tab show up in the task manager.
92 task_manager::WebContentsTags::CreateForTabContents(contents); 92 task_manager::WebContentsTags::CreateForTabContents(contents);
93 } 93 }
94 94
95 int BrowserTabStripModelDelegate::GetDragActions() const { 95 int BrowserTabStripModelDelegate::GetDragActions() const {
96 return TabStripModelDelegate::TAB_TEAROFF_ACTION | 96 return TabStripModelDelegate::TAB_TEAROFF_ACTION |
97 (browser_->tab_strip_model()->count() > 1 97 (browser_->tab_strip_model()->count() > 1
98 ? TabStripModelDelegate::TAB_MOVE_ACTION : 0); 98 ? TabStripModelDelegate::TAB_MOVE_ACTION : 0);
99 } 99 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 //////////////////////////////////////////////////////////////////////////////// 154 ////////////////////////////////////////////////////////////////////////////////
155 // BrowserTabStripModelDelegate, private: 155 // BrowserTabStripModelDelegate, private:
156 156
157 void BrowserTabStripModelDelegate::CloseFrame() { 157 void BrowserTabStripModelDelegate::CloseFrame() {
158 browser_->window()->Close(); 158 browser_->window()->Close();
159 } 159 }
160 160
161 } // namespace chrome 161 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/tab_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698