OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |