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

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

Issue 9969208: TabContents -> WebContentsImpl, part 20. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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) 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/tab_contents/background_contents.h" 5 #include "chrome/browser/tab_contents/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/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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // available as a part of the web platform, it probably makes sense to have 85 // available as a part of the web platform, it probably makes sense to have
86 // some way to scope navigation of a background page to its opener's security 86 // some way to scope navigation of a background page to its opener's security
87 // origin. Note: if the first navigation is to a URL outside the app's 87 // origin. Note: if the first navigation is to a URL outside the app's
88 // extent a background page will be opened but will remain at about:blank. 88 // extent a background page will be opened but will remain at about:blank.
89 content::NotificationService::current()->Notify( 89 content::NotificationService::current()->Notify(
90 chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED, 90 chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED,
91 content::Source<Profile>(profile_), 91 content::Source<Profile>(profile_),
92 content::Details<BackgroundContents>(this)); 92 content::Details<BackgroundContents>(this));
93 } 93 }
94 94
95 // Forward requests to add a new TabContents to our delegate. 95 // Forward requests to add a new WebContents to our delegate.
96 void BackgroundContents::AddNewContents(WebContents* source, 96 void BackgroundContents::AddNewContents(WebContents* source,
97 WebContents* new_contents, 97 WebContents* new_contents,
98 WindowOpenDisposition disposition, 98 WindowOpenDisposition disposition,
99 const gfx::Rect& initial_pos, 99 const gfx::Rect& initial_pos,
100 bool user_gesture) { 100 bool user_gesture) {
101 delegate_->AddWebContents( 101 delegate_->AddWebContents(
102 new_contents, disposition, initial_pos, user_gesture); 102 new_contents, disposition, initial_pos, user_gesture);
103 } 103 }
104 104
105 void BackgroundContents::RenderViewGone(base::TerminationStatus status) { 105 void BackgroundContents::RenderViewGone(base::TerminationStatus status) {
(...skipping 18 matching lines...) Expand all
124 case chrome::NOTIFICATION_PROFILE_DESTROYED: 124 case chrome::NOTIFICATION_PROFILE_DESTROYED:
125 case content::NOTIFICATION_APP_TERMINATING: { 125 case content::NOTIFICATION_APP_TERMINATING: {
126 delete this; 126 delete this;
127 break; 127 break;
128 } 128 }
129 default: 129 default:
130 NOTREACHED() << "Unexpected notification sent."; 130 NOTREACHED() << "Unexpected notification sent.";
131 break; 131 break;
132 } 132 }
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/background_contents.h ('k') | chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698