| 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/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 hover_tab_selector_.CancelTabTransition(); | 292 hover_tab_selector_.CancelTabTransition(); |
| 293 | 293 |
| 294 tabstrip_->PrepareForCloseAt(model_index, source); | 294 tabstrip_->PrepareForCloseAt(model_index, source); |
| 295 model_->CloseWebContentsAt(model_index, | 295 model_->CloseWebContentsAt(model_index, |
| 296 TabStripModel::CLOSE_USER_GESTURE | | 296 TabStripModel::CLOSE_USER_GESTURE | |
| 297 TabStripModel::CLOSE_CREATE_HISTORICAL_TAB); | 297 TabStripModel::CLOSE_CREATE_HISTORICAL_TAB); |
| 298 } | 298 } |
| 299 | 299 |
| 300 void BrowserTabStripController::ToggleTabAudioMute(int model_index) { | 300 void BrowserTabStripController::ToggleTabAudioMute(int model_index) { |
| 301 content::WebContents* const contents = model_->GetWebContentsAt(model_index); | 301 content::WebContents* const contents = model_->GetWebContentsAt(model_index); |
| 302 chrome::SetTabAudioMuted(contents, !chrome::IsTabAudioMuted(contents)); | 302 chrome::SetTabAudioMuted(contents, !chrome::IsTabAudioMuted(contents), |
| 303 chrome::kMutedToggleCauseUser); |
| 303 } | 304 } |
| 304 | 305 |
| 305 void BrowserTabStripController::ShowContextMenuForTab( | 306 void BrowserTabStripController::ShowContextMenuForTab( |
| 306 Tab* tab, | 307 Tab* tab, |
| 307 const gfx::Point& p, | 308 const gfx::Point& p, |
| 308 ui::MenuSourceType source_type) { | 309 ui::MenuSourceType source_type) { |
| 309 context_menu_contents_.reset(new TabContextMenuContents(tab, this)); | 310 context_menu_contents_.reset(new TabContextMenuContents(tab, this)); |
| 310 context_menu_contents_->RunMenuAt(p, source_type); | 311 context_menu_contents_->RunMenuAt(p, source_type); |
| 311 } | 312 } |
| 312 | 313 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 url, | 582 url, |
| 582 mime_type.empty() || | 583 mime_type.empty() || |
| 583 net::IsSupportedMimeType(mime_type) || | 584 net::IsSupportedMimeType(mime_type) || |
| 584 content::PluginService::GetInstance()->GetPluginInfo( | 585 content::PluginService::GetInstance()->GetPluginInfo( |
| 585 -1, // process ID | 586 -1, // process ID |
| 586 MSG_ROUTING_NONE, // routing ID | 587 MSG_ROUTING_NONE, // routing ID |
| 587 model_->profile()->GetResourceContext(), | 588 model_->profile()->GetResourceContext(), |
| 588 url, GURL(), mime_type, false, | 589 url, GURL(), mime_type, false, |
| 589 NULL, &plugin, NULL)); | 590 NULL, &plugin, NULL)); |
| 590 } | 591 } |
| OLD | NEW |