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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_media_menu_model.cc

Issue 2307083002: Cleanup: move WebRTC related files from chrome/browser/media to chrome/browser/media/webrtc/ (Closed)
Patch Set: Removed file wrongly resuscitated during rebase Created 4 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/content_settings/content_setting_media_menu_model.h" 5 #include "chrome/browser/ui/content_settings/content_setting_media_menu_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 10 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
11 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 11 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
12 12
13 ContentSettingMediaMenuModel::ContentSettingMediaMenuModel( 13 ContentSettingMediaMenuModel::ContentSettingMediaMenuModel(
14 content::MediaStreamType type, 14 content::MediaStreamType type,
15 ContentSettingBubbleModel* bubble_model, 15 ContentSettingBubbleModel* bubble_model,
16 const MenuLabelChangedCallback& callback) 16 const MenuLabelChangedCallback& callback)
17 : ui::SimpleMenuModel(this), 17 : ui::SimpleMenuModel(this),
18 type_(type), 18 type_(type),
19 media_bubble_model_(bubble_model), 19 media_bubble_model_(bubble_model),
20 callback_(callback) { 20 callback_(callback) {
(...skipping 26 matching lines...) Expand all
47 47
48 void ContentSettingMediaMenuModel::ExecuteCommand(int command_id, 48 void ContentSettingMediaMenuModel::ExecuteCommand(int command_id,
49 int event_flags) { 49 int event_flags) {
50 CommandMap::const_iterator it = commands_.find(command_id); 50 CommandMap::const_iterator it = commands_.find(command_id);
51 DCHECK(it != commands_.end()); 51 DCHECK(it != commands_.end());
52 media_bubble_model_->OnMediaMenuClicked(type_, it->second.id); 52 media_bubble_model_->OnMediaMenuClicked(type_, it->second.id);
53 53
54 if (!callback_.is_null()) 54 if (!callback_.is_null())
55 callback_.Run(type_, it->second.name); 55 callback_.Run(type_, it->second.name);
56 } 56 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc ('k') | chrome/browser/ui/media_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698