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

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

Issue 2775003: Added plumbing to transport the frame name between RenderViewHost and the Webkit layer. (Closed)
Patch Set: Added plumbing from chrome -> webkit api. Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/render_view_host_delegate_helper.h" 5 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/character_encoding.h" 10 #include "chrome/browser/character_encoding.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return false; 49 return false;
50 50
51 return true; 51 return true;
52 } 52 }
53 TabContents* RenderViewHostDelegateViewHelper::CreateNewWindow( 53 TabContents* RenderViewHostDelegateViewHelper::CreateNewWindow(
54 int route_id, 54 int route_id,
55 Profile* profile, 55 Profile* profile,
56 SiteInstance* site, 56 SiteInstance* site,
57 DOMUITypeID domui_type, 57 DOMUITypeID domui_type,
58 RenderViewHostDelegate* opener, 58 RenderViewHostDelegate* opener,
59 WindowContainerType window_container_type) { 59 WindowContainerType window_container_type,
60 const string16& frame_name) {
60 if (ShouldOpenBackgroundContents(window_container_type, 61 if (ShouldOpenBackgroundContents(window_container_type,
61 opener->GetURL(), 62 opener->GetURL(),
62 site->GetProcess(), 63 site->GetProcess(),
63 profile)) { 64 profile)) {
64 BackgroundContents* contents = new BackgroundContents(site, route_id); 65 BackgroundContents* contents =
66 new BackgroundContents(site, route_id, frame_name);
65 pending_contents_[route_id] = contents->render_view_host(); 67 pending_contents_[route_id] = contents->render_view_host();
66 return NULL; 68 return NULL;
67 } 69 }
68 70
69 // Create the new web contents. This will automatically create the new 71 // Create the new web contents. This will automatically create the new
70 // TabContentsView. In the future, we may want to create the view separately. 72 // TabContentsView. In the future, we may want to create the view separately.
71 TabContents* new_contents = 73 TabContents* new_contents =
72 new TabContents(profile, 74 new TabContents(profile,
73 site, 75 site,
74 route_id, 76 route_id,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 270 }
269 DCHECK(!web_prefs.default_encoding.empty()); 271 DCHECK(!web_prefs.default_encoding.empty());
270 272
271 if (is_dom_ui) { 273 if (is_dom_ui) {
272 web_prefs.loads_images_automatically = true; 274 web_prefs.loads_images_automatically = true;
273 web_prefs.javascript_enabled = true; 275 web_prefs.javascript_enabled = true;
274 } 276 }
275 277
276 return web_prefs; 278 return web_prefs;
277 } 279 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698