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

Side by Side Diff: chrome/browser/tab_contents/background_contents.cc

Issue 6319001: Support window.opener after a process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/background_contents.h" 5 #include "chrome/browser/tab_contents/background_contents.h"
6 6
7 #include "chrome/browser/background_contents_service.h" 7 #include "chrome/browser/background_contents_service.h"
8 #include "chrome/browser/extensions/extension_message_service.h" 8 #include "chrome/browser/extensions/extension_message_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/renderer_preferences_util.h" 10 #include "chrome/browser/renderer_preferences_util.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 url_ = params.url; 96 url_ = params.url;
97 97
98 Profile* profile = render_view_host->process()->profile(); 98 Profile* profile = render_view_host->process()->profile();
99 NotificationService::current()->Notify( 99 NotificationService::current()->Notify(
100 NotificationType::BACKGROUND_CONTENTS_NAVIGATED, 100 NotificationType::BACKGROUND_CONTENTS_NAVIGATED,
101 Source<Profile>(profile), 101 Source<Profile>(profile),
102 Details<BackgroundContents>(this)); 102 Details<BackgroundContents>(this));
103 } 103 }
104 104
105 void BackgroundContents::RunJavaScriptMessage( 105 void BackgroundContents::RunJavaScriptMessage(
106 const RenderViewHost* rvh,
106 const std::wstring& message, 107 const std::wstring& message,
107 const std::wstring& default_prompt, 108 const std::wstring& default_prompt,
108 const GURL& frame_url, 109 const GURL& frame_url,
109 const int flags, 110 const int flags,
110 IPC::Message* reply_msg, 111 IPC::Message* reply_msg,
111 bool* did_suppress_message) { 112 bool* did_suppress_message) {
112 // TODO(rafaelw): Implement, The JavaScriptModalDialog needs to learn about 113 // TODO(rafaelw): Implement, The JavaScriptModalDialog needs to learn about
113 // BackgroundContents. 114 // BackgroundContents.
114 *did_suppress_message = true; 115 *did_suppress_message = true;
115 } 116 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 BackgroundContents* 253 BackgroundContents*
253 BackgroundContents::GetBackgroundContentsByID(int render_process_id, 254 BackgroundContents::GetBackgroundContentsByID(int render_process_id,
254 int render_view_id) { 255 int render_view_id) {
255 RenderViewHost* render_view_host = 256 RenderViewHost* render_view_host =
256 RenderViewHost::FromID(render_process_id, render_view_id); 257 RenderViewHost::FromID(render_process_id, render_view_id);
257 if (!render_view_host) 258 if (!render_view_host)
258 return NULL; 259 return NULL;
259 260
260 return render_view_host->delegate()->GetAsBackgroundContents(); 261 return render_view_host->delegate()->GetAsBackgroundContents();
261 } 262 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/background_contents.h ('k') | chrome/browser/tab_contents/web_contents_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698