Index: chrome/browser/android/webapps/single_tab_mode_tab_helper.h |
diff --git a/chrome/browser/android/webapps/single_tab_mode_tab_helper.h b/chrome/browser/android/webapps/single_tab_mode_tab_helper.h |
index 787667b107f1be74a5b4878a25204b56405fc37c..2a6801b79635c4494b0418a5201a7b50e7a1a4f6 100644 |
--- a/chrome/browser/android/webapps/single_tab_mode_tab_helper.h |
+++ b/chrome/browser/android/webapps/single_tab_mode_tab_helper.h |
@@ -5,28 +5,20 @@ |
#ifndef CHROME_BROWSER_ANDROID_WEBAPPS_SINGLE_TAB_MODE_TAB_HELPER_H_ |
#define CHROME_BROWSER_ANDROID_WEBAPPS_SINGLE_TAB_MODE_TAB_HELPER_H_ |
-#include <stdint.h> |
- |
-#include <set> |
- |
-#include "base/compiler_specific.h" |
#include "base/macros.h" |
#include "chrome/browser/ui/blocked_content/blocked_window_params.h" |
-#include "content/public/browser/web_contents_observer.h" |
#include "content/public/browser/web_contents_user_data.h" |
// Registers and unregisters the IDs of renderers in single tab mode, which |
// are disallowed from opening new windows via |
// ChromeContentBrowserClient::CanCreateWindow(). |
class SingleTabModeTabHelper |
- : public content::WebContentsObserver, |
- public content::WebContentsUserData<SingleTabModeTabHelper> { |
+ : public content::WebContentsUserData<SingleTabModeTabHelper> { |
public: |
- // Checks if the ID pair is blocked from creating new windows. IO-thread only. |
- static bool IsRegistered(int32_t process_id, int32_t routing_id); |
- |
~SingleTabModeTabHelper() override; |
+ bool block_all_new_windows() { return block_all_new_windows_; } |
+ |
// Handles opening the given URL through the TabModel. |
void HandleOpenUrl(const BlockedWindowParams& params); |
@@ -34,15 +26,12 @@ class SingleTabModeTabHelper |
// current need to allow toggling this flag on or off. |
void PermanentlyBlockAllNewWindows(); |
- // content::WebContentsObserver |
- void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; |
- void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; |
- |
private: |
explicit SingleTabModeTabHelper(content::WebContents* web_contents); |
friend class content::WebContentsUserData<SingleTabModeTabHelper>; |
- bool block_all_new_windows_; |
+ content::WebContents* web_contents_; |
+ bool block_all_new_windows_ = false; |
DISALLOW_COPY_AND_ASSIGN(SingleTabModeTabHelper); |
}; |