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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 delegate_->OnClosing(); | 111 delegate_->OnClosing(); |
112 } | 112 } |
113 | 113 |
114 // WebIntentPicker implementation. | 114 // WebIntentPicker implementation. |
115 virtual void Close() OVERRIDE {} | 115 virtual void Close() OVERRIDE {} |
116 virtual void SetActionString(const string16& action) OVERRIDE {} | 116 virtual void SetActionString(const string16& action) OVERRIDE {} |
117 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE { | 117 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE { |
118 num_extensions_installed_++; | 118 num_extensions_installed_++; |
119 } | 119 } |
120 virtual void OnExtensionInstallFailure(const std::string& id) OVERRIDE {} | 120 virtual void OnExtensionInstallFailure(const std::string& id) OVERRIDE {} |
| 121 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) OVERRIDE {} |
121 virtual void OnPendingAsyncCompleted() OVERRIDE { | 122 virtual void OnPendingAsyncCompleted() OVERRIDE { |
122 StopWaiting(); | 123 StopWaiting(); |
123 } | 124 } |
124 | 125 |
125 // WebIntentPickerModelObserver implementation. | 126 // WebIntentPickerModelObserver implementation. |
126 virtual void OnModelChanged(WebIntentPickerModel* model) OVERRIDE { | 127 virtual void OnModelChanged(WebIntentPickerModel* model) OVERRIDE { |
127 num_installed_services_ = | 128 num_installed_services_ = |
128 static_cast<int>(model->GetInstalledServiceCount()); | 129 static_cast<int>(model->GetInstalledServiceCount()); |
129 } | 130 } |
130 virtual void OnFaviconChanged( | 131 virtual void OnFaviconChanged( |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 | 632 |
632 EXPECT_EQ(2, picker_.num_installed_services_); | 633 EXPECT_EQ(2, picker_.num_installed_services_); |
633 | 634 |
634 // The tab is shown immediately without needing to call OnServiceChosen. | 635 // The tab is shown immediately without needing to call OnServiceChosen. |
635 ASSERT_EQ(2, browser()->tab_count()); | 636 ASSERT_EQ(2, browser()->tab_count()); |
636 EXPECT_EQ(GURL(kServiceURL1), | 637 EXPECT_EQ(GURL(kServiceURL1), |
637 chrome::GetActiveWebContents(browser())->GetURL()); | 638 chrome::GetActiveWebContents(browser())->GetURL()); |
638 | 639 |
639 EXPECT_TRUE(dispatcher.dispatched_); | 640 EXPECT_TRUE(dispatcher.dispatched_); |
640 } | 641 } |
OLD | NEW |