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

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: Add WasSwappedOut message for clean exit. 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 url_ = params.url; 97 url_ = params.url;
98 98
99 Profile* profile = render_view_host->process()->profile(); 99 Profile* profile = render_view_host->process()->profile();
100 NotificationService::current()->Notify( 100 NotificationService::current()->Notify(
101 NotificationType::BACKGROUND_CONTENTS_NAVIGATED, 101 NotificationType::BACKGROUND_CONTENTS_NAVIGATED,
102 Source<Profile>(profile), 102 Source<Profile>(profile),
103 Details<BackgroundContents>(this)); 103 Details<BackgroundContents>(this));
104 } 104 }
105 105
106 void BackgroundContents::RunJavaScriptMessage( 106 void BackgroundContents::RunJavaScriptMessage(
107 const RenderViewHost* rvh,
107 const std::wstring& message, 108 const std::wstring& message,
108 const std::wstring& default_prompt, 109 const std::wstring& default_prompt,
109 const GURL& frame_url, 110 const GURL& frame_url,
110 const int flags, 111 const int flags,
111 IPC::Message* reply_msg, 112 IPC::Message* reply_msg,
112 bool* did_suppress_message) { 113 bool* did_suppress_message) {
113 // TODO(rafaelw): Implement, The JavaScriptModalDialog needs to learn about 114 // TODO(rafaelw): Implement, The JavaScriptModalDialog needs to learn about
114 // BackgroundContents. 115 // BackgroundContents.
115 *did_suppress_message = true; 116 *did_suppress_message = true;
116 } 117 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 BackgroundContents* 263 BackgroundContents*
263 BackgroundContents::GetBackgroundContentsByID(int render_process_id, 264 BackgroundContents::GetBackgroundContentsByID(int render_process_id,
264 int render_view_id) { 265 int render_view_id) {
265 RenderViewHost* render_view_host = 266 RenderViewHost* render_view_host =
266 RenderViewHost::FromID(render_process_id, render_view_id); 267 RenderViewHost::FromID(render_process_id, render_view_id);
267 if (!render_view_host) 268 if (!render_view_host)
268 return NULL; 269 return NULL;
269 270
270 return render_view_host->delegate()->GetAsBackgroundContents(); 271 return render_view_host->delegate()->GetAsBackgroundContents();
271 } 272 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698