Chromium Code Reviews| 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..3cf69272c054a56dfa281f62b7cb8303c076fa0c 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 |
|
ncarter (slow)
2017/04/20 21:30:36
// Tracks tabs in single tab mode, which are disal
Charlie Harrison
2017/04/21 15:30:07
Done.
|
| // 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() const { 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_; |
|
ncarter (slow)
2017/04/20 21:30:35
#include web_contents.h
Charlie Harrison
2017/04/21 15:30:07
Only needs a fwd declaration, added one.
|
| + bool block_all_new_windows_ = false; |
| DISALLOW_COPY_AND_ASSIGN(SingleTabModeTabHelper); |
| }; |