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/ui/app_list/start_page_service.h" | 5 #include "chrome/browser/ui/app_list/start_page_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 virtual ~StartPageWebContentsDelegate() {} | 81 virtual ~StartPageWebContentsDelegate() {} |
82 | 82 |
83 virtual void RequestMediaAccessPermission( | 83 virtual void RequestMediaAccessPermission( |
84 content::WebContents* web_contents, | 84 content::WebContents* web_contents, |
85 const content::MediaStreamRequest& request, | 85 const content::MediaStreamRequest& request, |
86 const content::MediaResponseCallback& callback) OVERRIDE { | 86 const content::MediaResponseCallback& callback) OVERRIDE { |
87 if (MediaStreamInfoBarDelegate::Create(web_contents, request, callback)) | 87 if (MediaStreamInfoBarDelegate::Create(web_contents, request, callback)) |
88 NOTREACHED() << "Media stream not allowed for WebUI"; | 88 NOTREACHED() << "Media stream not allowed for WebUI"; |
89 } | 89 } |
90 | 90 |
| 91 virtual bool CheckMediaAccessPermission( |
| 92 content::WebContents* web_contents, |
| 93 const GURL& security_origin, |
| 94 content::MediaStreamType type) OVERRIDE { |
| 95 return MediaCaptureDevicesDispatcher::GetInstance() |
| 96 ->CheckMediaAccessPermission(web_contents, security_origin, type); |
| 97 } |
| 98 |
91 private: | 99 private: |
92 DISALLOW_COPY_AND_ASSIGN(StartPageWebContentsDelegate); | 100 DISALLOW_COPY_AND_ASSIGN(StartPageWebContentsDelegate); |
93 }; | 101 }; |
94 | 102 |
95 // static | 103 // static |
96 StartPageService* StartPageService::Get(Profile* profile) { | 104 StartPageService* StartPageService::Get(Profile* profile) { |
97 return StartPageServiceFactory::GetForProfile(profile); | 105 return StartPageServiceFactory::GetForProfile(profile); |
98 } | 106 } |
99 | 107 |
100 StartPageService::StartPageService(Profile* profile) | 108 StartPageService::StartPageService(Profile* profile) |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 content::Referrer(), | 246 content::Referrer(), |
239 content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 247 content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
240 std::string()); | 248 std::string()); |
241 } | 249 } |
242 | 250 |
243 void StartPageService::UnloadContents() { | 251 void StartPageService::UnloadContents() { |
244 contents_.reset(); | 252 contents_.reset(); |
245 } | 253 } |
246 | 254 |
247 } // namespace app_list | 255 } // namespace app_list |
OLD | NEW |