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

Side by Side Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 2747943003: Remove media requesting code from StartPageService::StartPageWebContentsDelegate (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app_list/start_page_service.h" 5 #include "chrome/browser/ui/app_list/start_page_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 DISALLOW_COPY_AND_ASSIGN(ProfileDestroyObserver); 153 DISALLOW_COPY_AND_ASSIGN(ProfileDestroyObserver);
154 }; 154 };
155 155
156 class StartPageService::StartPageWebContentsDelegate 156 class StartPageService::StartPageWebContentsDelegate
157 : public content::WebContentsDelegate { 157 : public content::WebContentsDelegate {
158 public: 158 public:
159 explicit StartPageWebContentsDelegate(Profile* profile) : profile_(profile) {} 159 explicit StartPageWebContentsDelegate(Profile* profile) : profile_(profile) {}
160 ~StartPageWebContentsDelegate() override {} 160 ~StartPageWebContentsDelegate() override {}
161 161
162 void RequestMediaAccessPermission(
163 content::WebContents* web_contents,
164 const content::MediaStreamRequest& request,
165 const content::MediaResponseCallback& callback) override {
166 MediaStreamDevicesController::RequestPermissions(web_contents, request,
167 callback);
168 }
169
170 bool CheckMediaAccessPermission(content::WebContents* web_contents,
171 const GURL& security_origin,
172 content::MediaStreamType type) override {
173 return MediaCaptureDevicesDispatcher::GetInstance()
174 ->CheckMediaAccessPermission(web_contents, security_origin, type);
175 }
176
177 void AddNewContents(content::WebContents* source, 162 void AddNewContents(content::WebContents* source,
178 content::WebContents* new_contents, 163 content::WebContents* new_contents,
179 WindowOpenDisposition disposition, 164 WindowOpenDisposition disposition,
180 const gfx::Rect& initial_pos, 165 const gfx::Rect& initial_pos,
181 bool user_gesture, 166 bool user_gesture,
182 bool* was_blocked) override { 167 bool* was_blocked) override {
183 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); 168 chrome::ScopedTabbedBrowserDisplayer displayer(profile_);
184 // Force all links to open in a new tab, even if they were trying to open a 169 // Force all links to open in a new tab, even if they were trying to open a
185 // new window. 170 // new window.
186 disposition = disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB 171 disposition = disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 667
683 // Check for a new doodle. 668 // Check for a new doodle.
684 content::BrowserThread::PostDelayedTask( 669 content::BrowserThread::PostDelayedTask(
685 content::BrowserThread::UI, FROM_HERE, 670 content::BrowserThread::UI, FROM_HERE,
686 base::Bind(&StartPageService::FetchDoodleJson, 671 base::Bind(&StartPageService::FetchDoodleJson,
687 weak_factory_.GetWeakPtr()), 672 weak_factory_.GetWeakPtr()),
688 recheck_delay); 673 recheck_delay);
689 } 674 }
690 675
691 } // namespace app_list 676 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698