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

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

Issue 921443003: Fix RenderFrameCreated and RenderFrameDeleted WebContentsObserver methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete pending callbacks in ManifestManagerHost destructor. Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_permission_context_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/background/background_contents.h" 5 #include "chrome/browser/background/background_contents.h"
6 6
7 #include "chrome/browser/background/background_contents_service.h" 7 #include "chrome/browser/background/background_contents_service.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 9 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 23 matching lines...) Expand all
34 content::SessionStorageNamespace* session_storage_namespace) 34 content::SessionStorageNamespace* session_storage_namespace)
35 : delegate_(delegate), 35 : delegate_(delegate),
36 extension_host_delegate_(extensions::ExtensionsBrowserClient::Get() 36 extension_host_delegate_(extensions::ExtensionsBrowserClient::Get()
37 ->CreateExtensionHostDelegate()) { 37 ->CreateExtensionHostDelegate()) {
38 profile_ = Profile::FromBrowserContext( 38 profile_ = Profile::FromBrowserContext(
39 site_instance->GetBrowserContext()); 39 site_instance->GetBrowserContext());
40 40
41 WebContents::CreateParams create_params(profile_, site_instance); 41 WebContents::CreateParams create_params(profile_, site_instance);
42 create_params.routing_id = routing_id; 42 create_params.routing_id = routing_id;
43 create_params.main_frame_routing_id = main_frame_routing_id; 43 create_params.main_frame_routing_id = main_frame_routing_id;
44 create_params.renderer_initiated_creation = true;
44 if (session_storage_namespace) { 45 if (session_storage_namespace) {
45 content::SessionStorageNamespaceMap session_storage_namespace_map; 46 content::SessionStorageNamespaceMap session_storage_namespace_map;
46 session_storage_namespace_map.insert( 47 session_storage_namespace_map.insert(
47 std::make_pair(partition_id, session_storage_namespace)); 48 std::make_pair(partition_id, session_storage_namespace));
48 web_contents_.reset(WebContents::CreateWithSessionStorage( 49 web_contents_.reset(WebContents::CreateWithSessionStorage(
49 create_params, session_storage_namespace_map)); 50 create_params, session_storage_namespace_map));
50 } else { 51 } else {
51 web_contents_.reset(WebContents::Create(create_params)); 52 web_contents_.reset(WebContents::Create(create_params));
52 } 53 }
53 extensions::SetViewType( 54 extensions::SetViewType(
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 NOTREACHED() << "Unexpected notification sent."; 172 NOTREACHED() << "Unexpected notification sent.";
172 break; 173 break;
173 } 174 }
174 } 175 }
175 176
176 void BackgroundContents::CreateRenderViewNow() { 177 void BackgroundContents::CreateRenderViewNow() {
177 web_contents()->GetController().LoadURL(initial_url_, content::Referrer(), 178 web_contents()->GetController().LoadURL(initial_url_, content::Referrer(),
178 ui::PAGE_TRANSITION_LINK, 179 ui::PAGE_TRANSITION_LINK,
179 std::string()); 180 std::string());
180 } 181 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_permission_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698