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

Side by Side Diff: content/public/test/test_navigation_observer.h

Issue 248963004: "Go back" on the block interstitial closes the tab if there is no previous URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo fix. (Also rebase) Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_
6 #define CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_ 6 #define CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class TestWebContentsObserver; 45 class TestWebContentsObserver;
46 46
47 // Callbacks for WebContents-related events. 47 // Callbacks for WebContents-related events.
48 void OnWebContentsCreated(WebContents* web_contents); 48 void OnWebContentsCreated(WebContents* web_contents);
49 void OnWebContentsDestroyed(TestWebContentsObserver* observer, 49 void OnWebContentsDestroyed(TestWebContentsObserver* observer,
50 WebContents* web_contents); 50 WebContents* web_contents);
51 void OnNavigationEntryCommitted( 51 void OnNavigationEntryCommitted(
52 TestWebContentsObserver* observer, 52 TestWebContentsObserver* observer,
53 WebContents* web_contents, 53 WebContents* web_contents,
54 const LoadCommittedDetails& load_details); 54 const LoadCommittedDetails& load_details);
55 void OnDidAttachInterstitialPage(WebContents* web_contents);
55 void OnDidStartLoading(WebContents* web_contents); 56 void OnDidStartLoading(WebContents* web_contents);
56 void OnDidStopLoading(WebContents* web_contents); 57 void OnDidStopLoading(WebContents* web_contents);
57 58
58 // If true the navigation has started. 59 // If true the navigation has started.
59 bool navigation_started_; 60 bool navigation_started_;
60 61
61 // The number of navigations that have been completed. 62 // The number of navigations that have been completed.
62 int navigations_completed_; 63 int navigations_completed_;
63 64
64 // The number of navigations to wait for. 65 // The number of navigations to wait for.
65 int number_of_navigations_; 66 int number_of_navigations_;
66 67
67 // The MessageLoopRunner used to spin the message loop. 68 // The MessageLoopRunner used to spin the message loop.
68 scoped_refptr<MessageLoopRunner> message_loop_runner_; 69 scoped_refptr<MessageLoopRunner> message_loop_runner_;
69 70
70 // Callback invoked on WebContents creation. 71 // Callback invoked on WebContents creation.
71 base::Callback<void(WebContents*)> web_contents_created_callback_; 72 base::Callback<void(WebContents*)> web_contents_created_callback_;
72 73
73 // Living TestWebContentsObservers created by this observer. 74 // Living TestWebContentsObservers created by this observer.
74 std::set<TestWebContentsObserver*> web_contents_observers_; 75 std::set<TestWebContentsObserver*> web_contents_observers_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(TestNavigationObserver); 77 DISALLOW_COPY_AND_ASSIGN(TestNavigationObserver);
77 }; 78 };
78 79
79 } // namespace content 80 } // namespace content
80 81
81 #endif // CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_ 82 #endif // CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/managed_mode/managed_mode_interstitial.cc ('k') | content/public/test/test_navigation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698