| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 return MediaCaptureDevicesDispatcher::GetInstance() | 173 return MediaCaptureDevicesDispatcher::GetInstance() |
| 174 ->CheckMediaAccessPermission(web_contents, security_origin, type); | 174 ->CheckMediaAccessPermission(web_contents, security_origin, type); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void AddNewContents(content::WebContents* source, | 177 void AddNewContents(content::WebContents* source, |
| 178 content::WebContents* new_contents, | 178 content::WebContents* new_contents, |
| 179 WindowOpenDisposition disposition, | 179 WindowOpenDisposition disposition, |
| 180 const gfx::Rect& initial_pos, | 180 const gfx::Rect& initial_pos, |
| 181 bool user_gesture, | 181 bool user_gesture, |
| 182 bool* was_blocked) override { | 182 bool* was_blocked) override { |
| 183 chrome::ScopedTabbedBrowserDisplayer displayer( | 183 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); |
| 184 profile_, chrome::GetActiveDesktop()); | |
| 185 // Force all links to open in a new tab, even if they were trying to open a | 184 // Force all links to open in a new tab, even if they were trying to open a |
| 186 // new window. | 185 // new window. |
| 187 disposition = | 186 disposition = |
| 188 disposition == NEW_BACKGROUND_TAB ? disposition : NEW_FOREGROUND_TAB; | 187 disposition == NEW_BACKGROUND_TAB ? disposition : NEW_FOREGROUND_TAB; |
| 189 chrome::AddWebContents(displayer.browser(), | 188 chrome::AddWebContents(displayer.browser(), |
| 190 nullptr, | 189 nullptr, |
| 191 new_contents, | 190 new_contents, |
| 192 disposition, | 191 disposition, |
| 193 initial_pos, | 192 initial_pos, |
| 194 user_gesture, | 193 user_gesture, |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 | 699 |
| 701 // Check for a new doodle. | 700 // Check for a new doodle. |
| 702 content::BrowserThread::PostDelayedTask( | 701 content::BrowserThread::PostDelayedTask( |
| 703 content::BrowserThread::UI, FROM_HERE, | 702 content::BrowserThread::UI, FROM_HERE, |
| 704 base::Bind(&StartPageService::FetchDoodleJson, | 703 base::Bind(&StartPageService::FetchDoodleJson, |
| 705 weak_factory_.GetWeakPtr()), | 704 weak_factory_.GetWeakPtr()), |
| 706 recheck_delay); | 705 recheck_delay); |
| 707 } | 706 } |
| 708 | 707 |
| 709 } // namespace app_list | 708 } // namespace app_list |
| OLD | NEW |