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

Side by Side Diff: chrome/browser/sessions/restore_tab_helper.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/sessions/restore_tab_helper.h" 5 #include "chrome/browser/sessions/restore_tab_helper.h"
6 6
7 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 7 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
8 #include "chrome/common/extensions/extension_messages.h" 8 #include "chrome/common/extensions/extension_messages.h"
9 #include "content/browser/renderer_host/render_view_host.h" 9 #include "content/browser/renderer_host/render_view_host.h"
10 #include "content/common/content_notification_types.h"
10 #include "content/common/notification_service.h" 11 #include "content/common/notification_service.h"
11 #include "content/common/notification_type.h"
12 12
13 RestoreTabHelper::RestoreTabHelper(TabContentsWrapper* tab) 13 RestoreTabHelper::RestoreTabHelper(TabContentsWrapper* tab)
14 : TabContentsObserver(tab->tab_contents()), 14 : TabContentsObserver(tab->tab_contents()),
15 tab_(tab) { 15 tab_(tab) {
16 } 16 }
17 17
18 RestoreTabHelper::~RestoreTabHelper() { 18 RestoreTabHelper::~RestoreTabHelper() {
19 } 19 }
20 20
21 void RestoreTabHelper::SetWindowID(const SessionID& id) { 21 void RestoreTabHelper::SetWindowID(const SessionID& id) {
22 window_id_ = id; 22 window_id_ = id;
23 NotificationService::current()->Notify( 23 NotificationService::current()->Notify(
24 NotificationType::TAB_PARENTED, 24 content::NOTIFICATION_TAB_PARENTED,
25 Source<TabContentsWrapper>(tab_), 25 Source<TabContentsWrapper>(tab_),
26 NotificationService::NoDetails()); 26 NotificationService::NoDetails());
27 27
28 // Extension code in the renderer holds the ID of the window that hosts it. 28 // Extension code in the renderer holds the ID of the window that hosts it.
29 // Notify it that the window ID changed. 29 // Notify it that the window ID changed.
30 tab_->render_view_host()->Send(new ExtensionMsg_UpdateBrowserWindowId( 30 tab_->render_view_host()->Send(new ExtensionMsg_UpdateBrowserWindowId(
31 tab_->render_view_host()->routing_id(), id.id())); 31 tab_->render_view_host()->routing_id(), id.id()));
32 } 32 }
33 33
34 void RestoreTabHelper::RenderViewCreated(RenderViewHost* render_view_host) { 34 void RestoreTabHelper::RenderViewCreated(RenderViewHost* render_view_host) {
35 render_view_host->Send( 35 render_view_host->Send(
36 new ExtensionMsg_UpdateBrowserWindowId(render_view_host->routing_id(), 36 new ExtensionMsg_UpdateBrowserWindowId(render_view_host->routing_id(),
37 window_id_.id())); 37 window_id_.id()));
38 } 38 }
OLDNEW
« no previous file with comments | « chrome/browser/service/service_process_control.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698