OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1700 fullscreen_controller_->LostMouseLock(); | 1700 fullscreen_controller_->LostMouseLock(); |
1701 } | 1701 } |
1702 | 1702 |
1703 void Browser::RequestMediaAccessPermission( | 1703 void Browser::RequestMediaAccessPermission( |
1704 content::WebContents* web_contents, | 1704 content::WebContents* web_contents, |
1705 const content::MediaStreamRequest* request, | 1705 const content::MediaStreamRequest* request, |
1706 const content::MediaResponseCallback& callback) { | 1706 const content::MediaResponseCallback& callback) { |
1707 RequestMediaAccessPermissionHelper(web_contents, request, callback); | 1707 RequestMediaAccessPermissionHelper(web_contents, request, callback); |
1708 } | 1708 } |
1709 | 1709 |
1710 void Browser::RequestPpapiBrokerPermission( | |
brettw
2012/08/20 05:29:47
You should be able to do this without touching Bro
Bernhard Bauer
2012/08/20 14:43:20
I was under the impression that WebContentsObserve
brettw
2012/08/20 23:36:25
No, the observes "do stuff" as well. If there were
Bernhard Bauer
2012/08/21 11:50:12
Done.
| |
1711 WebContents* web_contents, | |
1712 const GURL& url, | |
1713 const FilePath& plugin_path, | |
1714 const base::Callback<void(bool)>& callback) { | |
1715 // TODO(bauerb): Request permission. | |
1716 callback.Run(true); | |
1717 } | |
1718 | |
1710 /////////////////////////////////////////////////////////////////////////////// | 1719 /////////////////////////////////////////////////////////////////////////////// |
1711 // Browser, CoreTabHelperDelegate implementation: | 1720 // Browser, CoreTabHelperDelegate implementation: |
1712 | 1721 |
1713 void Browser::SwapTabContents(TabContents* old_tab_contents, | 1722 void Browser::SwapTabContents(TabContents* old_tab_contents, |
1714 TabContents* new_tab_contents) { | 1723 TabContents* new_tab_contents) { |
1715 int index = tab_strip_model_->GetIndexOfTabContents(old_tab_contents); | 1724 int index = tab_strip_model_->GetIndexOfTabContents(old_tab_contents); |
1716 DCHECK_NE(TabStripModel::kNoTab, index); | 1725 DCHECK_NE(TabStripModel::kNoTab, index); |
1717 tab_strip_model_->ReplaceTabContentsAt(index, new_tab_contents); | 1726 tab_strip_model_->ReplaceTabContentsAt(index, new_tab_contents); |
1718 } | 1727 } |
1719 | 1728 |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2319 if (contents && !allow_js_access) { | 2328 if (contents && !allow_js_access) { |
2320 contents->web_contents()->GetController().LoadURL( | 2329 contents->web_contents()->GetController().LoadURL( |
2321 target_url, | 2330 target_url, |
2322 content::Referrer(), | 2331 content::Referrer(), |
2323 content::PAGE_TRANSITION_LINK, | 2332 content::PAGE_TRANSITION_LINK, |
2324 std::string()); // No extra headers. | 2333 std::string()); // No extra headers. |
2325 } | 2334 } |
2326 | 2335 |
2327 return contents != NULL; | 2336 return contents != NULL; |
2328 } | 2337 } |
OLD | NEW |