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

Unified Diff: chrome/browser/sessions/session_tab_helper.cc

Issue 10917198: Switch NOTIFICATION_TAB_PARENTED to use WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/sync/glue/session_change_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_tab_helper.cc
diff --git a/chrome/browser/sessions/session_tab_helper.cc b/chrome/browser/sessions/session_tab_helper.cc
index 53abe02010ce9770a75721c89743e1779b5dfb3e..889df1970fc1674a827f7fdaac4dd7fb03b270a9 100644
--- a/chrome/browser/sessions/session_tab_helper.cc
+++ b/chrome/browser/sessions/session_tab_helper.cc
@@ -7,7 +7,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/session_service_factory.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/public/browser/notification_service.h"
@@ -26,14 +25,10 @@ SessionTabHelper::~SessionTabHelper() {
void SessionTabHelper::SetWindowID(const SessionID& id) {
window_id_ = id;
- // TODO(mpcomplete): Maybe this notification should send out a WebContents.
- TabContents* tab = TabContents::FromWebContents(web_contents());
- if (tab) {
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_TAB_PARENTED,
- content::Source<TabContents>(tab),
- content::NotificationService::NoDetails());
- }
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_TAB_PARENTED,
+ content::Source<content::WebContents>(web_contents()),
+ content::NotificationService::NoDetails());
// Extension code in the renderer holds the ID of the window that hosts it.
// Notify it that the window ID changed.
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/sync/glue/session_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698