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

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

Issue 559523004: Cleanup: Remove unneeded extension_messages.h usage and ifdef out some extensions code usage when e… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
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)
« no previous file with comments | « chrome/browser/sessions/session_tab_helper.h ('k') | chrome/browser/themes/theme_syncable_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698