| Index: chrome/browser/managed_mode/managed_mode_navigation_observer.h
|
| diff --git a/chrome/browser/managed_mode/managed_mode_navigation_observer.h b/chrome/browser/managed_mode/managed_mode_navigation_observer.h
|
| index 15dadd38c5418bcb4789fd72a1364e3f56e00ec4..60349d8c495717d01136188daff7a6e5458ca5b2 100644
|
| --- a/chrome/browser/managed_mode/managed_mode_navigation_observer.h
|
| +++ b/chrome/browser/managed_mode/managed_mode_navigation_observer.h
|
| @@ -8,6 +8,7 @@
|
| #include <set>
|
|
|
| #include "base/values.h"
|
| +#include "chrome/browser/ui/tab_webcontents_tracker.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/browser/web_contents_user_data.h"
|
|
|
| @@ -17,6 +18,7 @@ class ManagedUserService;
|
|
|
| class ManagedModeNavigationObserver
|
| : public content::WebContentsObserver,
|
| + public TabWebContentsTracker::Observer,
|
| public content::WebContentsUserData<ManagedModeNavigationObserver> {
|
| public:
|
| virtual ~ManagedModeNavigationObserver();
|
| @@ -46,6 +48,12 @@ class ManagedModeNavigationObserver
|
| // Set the elevation state for the corresponding WebContents.
|
| void set_elevated(bool is_elevated);
|
|
|
| + // TabWebContentsTracker::Observer
|
| + void OnTabReplacedAt(TabStripModel* tab_strip_model,
|
| + content::WebContents* old_contents,
|
| + content::WebContents* new_contents,
|
| + int index) OVERRIDE;
|
| +
|
| // Adds a special history entry for the visit attempt and shows the
|
| // interstitial.
|
| static void OnRequestBlocked(int render_process_host_id,
|
| @@ -132,6 +140,11 @@ class ManagedModeNavigationObserver
|
|
|
| int last_allowed_page_;
|
|
|
| + // This flag stores if the ClearObserverState function was called. This
|
| + // information is needed when transferring data of a
|
| + // ManagedModeNavigationObserver which is about to be replaced.
|
| + bool observer_state_cleared_;
|
| +
|
| // There are two starting points for a new navigation:
|
| // 1. NavigateToPendingEntry when the omnibox is used to navigate to a URL or
|
| // the user goes back or forward.
|
|
|