Chromium Code Reviews| Index: chrome/browser/ui/views/external_tab_container_win.cc |
| =================================================================== |
| --- chrome/browser/ui/views/external_tab_container_win.cc (revision 154307) |
| +++ chrome/browser/ui/views/external_tab_container_win.cc (working copy) |
| @@ -461,7 +461,7 @@ |
| } |
| } |
| -void ExternalTabContainerWin::AddNewContents(WebContents* source, |
| +bool ExternalTabContainerWin::AddNewContents(WebContents* source, |
| WebContents* new_contents, |
| WindowOpenDisposition disposition, |
| const gfx::Rect& initial_pos, |
| @@ -470,7 +470,7 @@ |
| DCHECK(pending_); |
| LOG(ERROR) << "Invalid automation provider. Dropping new contents notify"; |
| delete new_contents; |
| - return; |
| + return true; |
| } |
| scoped_refptr<ExternalTabContainerWin> new_container; |
| @@ -511,7 +511,7 @@ |
| Profile* profile = tab_contents->profile(); |
| tab_contents.release(); // Ownership has been transferred. |
| if (route_all_top_level_navigations_) { |
| - return; |
| + return true; |
| } |
| uintptr_t cookie = reinterpret_cast<uintptr_t>(new_container.get()); |
| pending_tabs_.Get()[cookie] = new_container; |
| @@ -529,14 +529,15 @@ |
| } else { |
| NOTREACHED(); |
| } |
| + return true; |
| } |
| -void ExternalTabContainerWin::WebContentsCreated(WebContents* source_contents, |
| +bool ExternalTabContainerWin::WebContentsCreated(WebContents* source_contents, |
| int64 source_frame_id, |
| const GURL& target_url, |
| WebContents* new_contents) { |
| if (!load_requests_via_automation_) |
| - return; |
| + return false; |
|
jam
2012/09/04 19:50:46
can you explain this? I'm not sure I understand wh
Tom Sepez
2012/09/04 20:46:16
Not sure there's any upside to returning false her
|
| RenderViewHost* rvh = new_contents->GetRenderViewHost(); |
| DCHECK(rvh != NULL); |
| @@ -545,6 +546,7 @@ |
| // requests initiated by this render view would be serviced when the |
| // external host connects to the new external tab instance. |
| RegisterRenderViewHostForAutomation(rvh, true); |
| + return true; |
| } |
| void ExternalTabContainerWin::CloseContents(content::WebContents* source) { |