| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 dispatched_(false) {} | 159 dispatched_(false) {} |
| 160 | 160 |
| 161 virtual const webkit_glue::WebIntentData& GetIntent() OVERRIDE { | 161 virtual const webkit_glue::WebIntentData& GetIntent() OVERRIDE { |
| 162 return intent_; | 162 return intent_; |
| 163 } | 163 } |
| 164 | 164 |
| 165 virtual void DispatchIntent(content::WebContents* web_contents) OVERRIDE { | 165 virtual void DispatchIntent(content::WebContents* web_contents) OVERRIDE { |
| 166 dispatched_ = true; | 166 dispatched_ = true; |
| 167 } | 167 } |
| 168 | 168 |
| 169 virtual void ResetDispatch() OVERRIDE { |
| 170 } |
| 171 |
| 169 virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type, | 172 virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type, |
| 170 const string16& data) OVERRIDE { | 173 const string16& data) OVERRIDE { |
| 171 } | 174 } |
| 172 | 175 |
| 173 virtual void RegisterReplyNotification( | 176 virtual void RegisterReplyNotification( |
| 174 const base::Callback<void(webkit_glue::WebIntentReplyType)>&) OVERRIDE { | 177 const base::Callback<void(webkit_glue::WebIntentReplyType)>&) OVERRIDE { |
| 175 } | 178 } |
| 176 | 179 |
| 177 webkit_glue::WebIntentData intent_; | 180 webkit_glue::WebIntentData intent_; |
| 178 bool dispatched_; | 181 bool dispatched_; |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 picker_.Wait(); | 434 picker_.Wait(); |
| 432 EXPECT_EQ(1, picker_.num_extensions_installed_); | 435 EXPECT_EQ(1, picker_.num_extensions_installed_); |
| 433 const Extension* extension = browser()->profile()->GetExtensionService()-> | 436 const Extension* extension = browser()->profile()->GetExtensionService()-> |
| 434 GetExtensionById(extension_id, false); | 437 GetExtensionById(extension_id, false); |
| 435 EXPECT_TRUE(extension); | 438 EXPECT_TRUE(extension); |
| 436 | 439 |
| 437 // Installing an extension should also choose it. Since this extension uses | 440 // Installing an extension should also choose it. Since this extension uses |
| 438 // window disposition, it will create a new tab. | 441 // window disposition, it will create a new tab. |
| 439 ASSERT_EQ(2, browser()->tab_count()); | 442 ASSERT_EQ(2, browser()->tab_count()); |
| 440 } | 443 } |
| OLD | NEW |