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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
508 return effective_url; | 508 return effective_url; |
509 } | 509 } |
510 #endif | 510 #endif |
511 | 511 |
512 void SetApplicationLocaleOnIOThread(const std::string& locale) { | 512 void SetApplicationLocaleOnIOThread(const std::string& locale) { |
513 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 513 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
514 g_io_thread_application_locale.Get() = locale; | 514 g_io_thread_application_locale.Get() = locale; |
515 } | 515 } |
516 | 516 |
517 void HandleBlockedPopupOnUIThread(const BlockedWindowParams& params) { | 517 void HandleBlockedPopupOnUIThread(const BlockedWindowParams& params) { |
518 WebContents* tab = tab_util::GetWebContentsByID(params.render_process_id(), | 518 RenderViewHost* render_view_host = |
Charlie Reis
2014/11/10 17:41:26
RenderViewHost is going away, and there can be mor
jochen (gone - plz use gerrit)
2014/11/10 19:39:13
done
| |
519 params.opener_id()); | 519 RenderViewHost::FromID(params.render_process_id(), params.opener_id()); |
520 if (!tab) | 520 if (!render_view_host) |
521 return; | |
522 WebContents* tab = WebContents::FromRenderViewHost(render_view_host); | |
523 // The tab might already have navigated away. | |
524 if (!tab || tab->GetRenderViewHost() != render_view_host) | |
521 return; | 525 return; |
522 | 526 |
523 prerender::PrerenderContents* prerender_contents = | 527 prerender::PrerenderContents* prerender_contents = |
524 prerender::PrerenderContents::FromWebContents(tab); | 528 prerender::PrerenderContents::FromWebContents(tab); |
525 if (prerender_contents) { | 529 if (prerender_contents) { |
526 prerender_contents->Destroy(prerender::FINAL_STATUS_CREATE_NEW_WINDOW); | 530 prerender_contents->Destroy(prerender::FINAL_STATUS_CREATE_NEW_WINDOW); |
527 return; | 531 return; |
528 } | 532 } |
529 | 533 |
530 PopupBlockerTabHelper* popup_helper = | 534 PopupBlockerTabHelper* popup_helper = |
(...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2677 switches::kDisableWebRtcEncryption, | 2681 switches::kDisableWebRtcEncryption, |
2678 }; | 2682 }; |
2679 to_command_line->CopySwitchesFrom(from_command_line, | 2683 to_command_line->CopySwitchesFrom(from_command_line, |
2680 kWebRtcDevSwitchNames, | 2684 kWebRtcDevSwitchNames, |
2681 arraysize(kWebRtcDevSwitchNames)); | 2685 arraysize(kWebRtcDevSwitchNames)); |
2682 } | 2686 } |
2683 } | 2687 } |
2684 #endif // defined(ENABLE_WEBRTC) | 2688 #endif // defined(ENABLE_WEBRTC) |
2685 | 2689 |
2686 } // namespace chrome | 2690 } // namespace chrome |
OLD | NEW |