OLD | NEW |
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 #include "content/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 InterstitialObserver(content::WebContents* web_contents, | 100 InterstitialObserver(content::WebContents* web_contents, |
101 const base::Closure& attach_callback, | 101 const base::Closure& attach_callback, |
102 const base::Closure& detach_callback) | 102 const base::Closure& detach_callback) |
103 : WebContentsObserver(web_contents), | 103 : WebContentsObserver(web_contents), |
104 attach_callback_(attach_callback), | 104 attach_callback_(attach_callback), |
105 detach_callback_(detach_callback) { | 105 detach_callback_(detach_callback) { |
106 } | 106 } |
107 virtual ~InterstitialObserver() {} | 107 virtual ~InterstitialObserver() {} |
108 | 108 |
109 // WebContentsObserver methods: | 109 // WebContentsObserver methods: |
110 virtual void DidAttachInterstitialPage() OVERRIDE { | 110 virtual void DidAttachInterstitialPage() override { |
111 attach_callback_.Run(); | 111 attach_callback_.Run(); |
112 } | 112 } |
113 virtual void DidDetachInterstitialPage() OVERRIDE { | 113 virtual void DidDetachInterstitialPage() override { |
114 detach_callback_.Run(); | 114 detach_callback_.Run(); |
115 } | 115 } |
116 | 116 |
117 private: | 117 private: |
118 base::Closure attach_callback_; | 118 base::Closure attach_callback_; |
119 base::Closure detach_callback_; | 119 base::Closure detach_callback_; |
120 | 120 |
121 DISALLOW_COPY_AND_ASSIGN(InterstitialObserver); | 121 DISALLOW_COPY_AND_ASSIGN(InterstitialObserver); |
122 }; | 122 }; |
123 | 123 |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 } | 825 } |
826 // The queue should not be empty, unless we were quit because of a timeout. | 826 // The queue should not be empty, unless we were quit because of a timeout. |
827 if (message_queue_.empty()) | 827 if (message_queue_.empty()) |
828 return false; | 828 return false; |
829 *message = message_queue_.front(); | 829 *message = message_queue_.front(); |
830 message_queue_.pop(); | 830 message_queue_.pop(); |
831 return true; | 831 return true; |
832 } | 832 } |
833 | 833 |
834 } // namespace content | 834 } // namespace content |
OLD | NEW |