| 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 c4c0e4e9983dff53d77b5d211f5b65d691f6de12..467ed22d5f67c0beb13f6c5c6343a144e6c395ec 100644
|
| --- a/chrome/browser/sessions/session_tab_helper.cc
|
| +++ b/chrome/browser/sessions/session_tab_helper.cc
|
| @@ -11,7 +11,10 @@
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| +
|
| +#if defined(ENABLE_EXTENSIONS)
|
| #include "extensions/common/extension_messages.h"
|
| +#endif
|
|
|
| DEFINE_WEB_CONTENTS_USER_DATA_KEY(SessionTabHelper);
|
|
|
| @@ -25,11 +28,13 @@ SessionTabHelper::~SessionTabHelper() {
|
| void SessionTabHelper::SetWindowID(const SessionID& id) {
|
| window_id_ = id;
|
|
|
| +#if defined(ENABLE_EXTENSIONS)
|
| // Extension code in the renderer holds the ID of the window that hosts it.
|
| // Notify it that the window ID changed.
|
| web_contents()->GetRenderViewHost()->Send(
|
| new ExtensionMsg_UpdateBrowserWindowId(
|
| web_contents()->GetRenderViewHost()->GetRoutingID(), id.id()));
|
| +#endif
|
| }
|
|
|
| // static
|
| @@ -47,12 +52,14 @@ SessionID::id_type SessionTabHelper::IdForWindowContainingTab(
|
| return session_tab_helper ? session_tab_helper->window_id().id() : -1;
|
| }
|
|
|
| +#if defined(ENABLE_EXTENSIONS)
|
| void SessionTabHelper::RenderViewCreated(
|
| content::RenderViewHost* render_view_host) {
|
| render_view_host->Send(
|
| new ExtensionMsg_UpdateBrowserWindowId(render_view_host->GetRoutingID(),
|
| window_id_.id()));
|
| }
|
| +#endif
|
|
|
| void SessionTabHelper::UserAgentOverrideSet(const std::string& user_agent) {
|
| #if defined(ENABLE_SESSION_SERVICE)
|
|
|