| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <iterator> | 6 #include <iterator> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 virtual void Close() OVERRIDE { StopWaiting(); } | 122 virtual void Close() OVERRIDE { StopWaiting(); } |
| 123 virtual void SetActionString(const string16& action) OVERRIDE {} | 123 virtual void SetActionString(const string16& action) OVERRIDE {} |
| 124 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE { | 124 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE { |
| 125 num_extensions_installed_++; | 125 num_extensions_installed_++; |
| 126 } | 126 } |
| 127 virtual void OnExtensionInstallFailure(const std::string& id) OVERRIDE {} | 127 virtual void OnExtensionInstallFailure(const std::string& id) OVERRIDE {} |
| 128 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) OVERRIDE {} | 128 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) OVERRIDE {} |
| 129 virtual void OnPendingAsyncCompleted() OVERRIDE { | 129 virtual void OnPendingAsyncCompleted() OVERRIDE { |
| 130 StopWaiting(); | 130 StopWaiting(); |
| 131 } | 131 } |
| 132 virtual void InvalidateDelegate() OVERRIDE { |
| 133 delegate_ = NULL; |
| 134 } |
| 132 | 135 |
| 133 // WebIntentPickerModelObserver implementation. | 136 // WebIntentPickerModelObserver implementation. |
| 134 virtual void OnModelChanged(WebIntentPickerModel* model) OVERRIDE { | 137 virtual void OnModelChanged(WebIntentPickerModel* model) OVERRIDE { |
| 135 num_installed_services_ = | 138 num_installed_services_ = |
| 136 static_cast<int>(model->GetInstalledServiceCount()); | 139 static_cast<int>(model->GetInstalledServiceCount()); |
| 137 } | 140 } |
| 138 virtual void OnFaviconChanged( | 141 virtual void OnFaviconChanged( |
| 139 WebIntentPickerModel* model, size_t index) OVERRIDE { | 142 WebIntentPickerModel* model, size_t index) OVERRIDE { |
| 140 num_icons_changed_++; | 143 num_icons_changed_++; |
| 141 } | 144 } |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 service_web_contents)); | 754 service_web_contents)); |
| 752 observer.Wait(); | 755 observer.Wait(); |
| 753 picker_.Wait(); | 756 picker_.Wait(); |
| 754 | 757 |
| 755 // The service tab is closed and the picker is shown again | 758 // The service tab is closed and the picker is shown again |
| 756 // on the original tab. | 759 // on the original tab. |
| 757 EXPECT_EQ(1, browser()->tab_count()); | 760 EXPECT_EQ(1, browser()->tab_count()); |
| 758 EXPECT_EQ(2, picker_.num_installed_services_); | 761 EXPECT_EQ(2, picker_.num_installed_services_); |
| 759 EXPECT_EQ(0, picker_.num_inline_disposition_); | 762 EXPECT_EQ(0, picker_.num_inline_disposition_); |
| 760 } | 763 } |
| OLD | NEW |