OLD | NEW |
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/media/fake_desktop_media_list.h" | 5 #include "chrome/browser/media/webrtc/fake_desktop_media_list.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "chrome/browser/media/desktop_media_list_observer.h" | 8 #include "chrome/browser/media/webrtc/desktop_media_list_observer.h" |
9 #include "ui/gfx/skia_util.h" | 9 #include "ui/gfx/skia_util.h" |
10 | 10 |
11 FakeDesktopMediaList::FakeDesktopMediaList() : observer_(NULL) {} | 11 FakeDesktopMediaList::FakeDesktopMediaList() : observer_(NULL) {} |
12 FakeDesktopMediaList::~FakeDesktopMediaList() {} | 12 FakeDesktopMediaList::~FakeDesktopMediaList() {} |
13 | 13 |
14 void FakeDesktopMediaList::AddSource(int id) { | 14 void FakeDesktopMediaList::AddSource(int id) { |
15 AddSourceByFullMediaID( | 15 AddSourceByFullMediaID( |
16 content::DesktopMediaID(content::DesktopMediaID::TYPE_WINDOW, id)); | 16 content::DesktopMediaID(content::DesktopMediaID::TYPE_WINDOW, id)); |
17 } | 17 } |
18 | 18 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 bitmap.eraseARGB(255, 0, 255, 0); | 63 bitmap.eraseARGB(255, 0, 255, 0); |
64 thumbnail_ = gfx::ImageSkia::CreateFrom1xBitmap(bitmap); | 64 thumbnail_ = gfx::ImageSkia::CreateFrom1xBitmap(bitmap); |
65 } | 65 } |
66 | 66 |
67 int FakeDesktopMediaList::GetSourceCount() const { return sources_.size(); } | 67 int FakeDesktopMediaList::GetSourceCount() const { return sources_.size(); } |
68 | 68 |
69 const DesktopMediaList::Source& FakeDesktopMediaList::GetSource( | 69 const DesktopMediaList::Source& FakeDesktopMediaList::GetSource( |
70 int index) const { | 70 int index) const { |
71 return sources_[index]; | 71 return sources_[index]; |
72 } | 72 } |
OLD | NEW |