| 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/views/tabs/browser_tab_strip_controller.h" | 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/task_runner_util.h" | 9 #include "base/task_runner_util.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 static_cast<TabStripModel::ContextMenuCommand>(command_id), | 153 static_cast<TabStripModel::ContextMenuCommand>(command_id), |
| 154 tab_); | 154 tab_); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void MenuClosed(ui::SimpleMenuModel* /*source*/) override { | 157 void MenuClosed(ui::SimpleMenuModel* /*source*/) override { |
| 158 if (controller_) | 158 if (controller_) |
| 159 controller_->tabstrip_->StopAllHighlighting(); | 159 controller_->tabstrip_->StopAllHighlighting(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 private: | 162 private: |
| 163 scoped_ptr<TabMenuModel> model_; | 163 std::unique_ptr<TabMenuModel> model_; |
| 164 scoped_ptr<views::MenuRunner> menu_runner_; | 164 std::unique_ptr<views::MenuRunner> menu_runner_; |
| 165 | 165 |
| 166 // The tab we're showing a menu for. | 166 // The tab we're showing a menu for. |
| 167 Tab* tab_; | 167 Tab* tab_; |
| 168 | 168 |
| 169 // A pointer back to our hosting controller, for command state information. | 169 // A pointer back to our hosting controller, for command state information. |
| 170 BrowserTabStripController* controller_; | 170 BrowserTabStripController* controller_; |
| 171 | 171 |
| 172 // The last command that was selected, so that we can start/stop highlighting | 172 // The last command that was selected, so that we can start/stop highlighting |
| 173 // appropriately as the user moves through the menu. | 173 // appropriately as the user moves through the menu. |
| 174 TabStripModel::ContextMenuCommand last_command_; | 174 TabStripModel::ContextMenuCommand last_command_; |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 content::WebPluginInfo plugin; | 571 content::WebPluginInfo plugin; |
| 572 tabstrip_->FileSupported( | 572 tabstrip_->FileSupported( |
| 573 url, | 573 url, |
| 574 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || | 574 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || |
| 575 content::PluginService::GetInstance()->GetPluginInfo( | 575 content::PluginService::GetInstance()->GetPluginInfo( |
| 576 -1, // process ID | 576 -1, // process ID |
| 577 MSG_ROUTING_NONE, // routing ID | 577 MSG_ROUTING_NONE, // routing ID |
| 578 model_->profile()->GetResourceContext(), url, GURL(), mime_type, | 578 model_->profile()->GetResourceContext(), url, GURL(), mime_type, |
| 579 false, NULL, &plugin, NULL)); | 579 false, NULL, &plugin, NULL)); |
| 580 } | 580 } |
| OLD | NEW |