OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // PageNavigator implementation that records the URL. | 30 // PageNavigator implementation that records the URL. |
31 class TestingPageNavigator : public PageNavigator { | 31 class TestingPageNavigator : public PageNavigator { |
32 public: | 32 public: |
33 // Deprecated. Please use one-argument variant. | 33 // Deprecated. Please use one-argument variant. |
34 // TODO(adriansc): Remove this method once refactoring changed all call | 34 // TODO(adriansc): Remove this method once refactoring changed all call |
35 // sites. | 35 // sites. |
36 virtual TabContents* OpenURL(const GURL& url, | 36 virtual TabContents* OpenURL(const GURL& url, |
37 const GURL& referrer, | 37 const GURL& referrer, |
38 WindowOpenDisposition disposition, | 38 WindowOpenDisposition disposition, |
39 content::PageTransition transition) OVERRIDE { | 39 content::PageTransition transition) OVERRIDE { |
40 return OpenURL(OpenURLParams(url, referrer, disposition, transition, | 40 return OpenURL(OpenURLParams(url, content::Referrer(), disposition, |
41 false)); | 41 transition, false)); |
42 } | 42 } |
43 | 43 |
44 virtual TabContents* OpenURL(const OpenURLParams& params) OVERRIDE { | 44 virtual TabContents* OpenURL(const OpenURLParams& params) OVERRIDE { |
45 urls_.push_back(params.url); | 45 urls_.push_back(params.url); |
46 return NULL; | 46 return NULL; |
47 } | 47 } |
48 | 48 |
49 std::vector<GURL> urls_; | 49 std::vector<GURL> urls_; |
50 }; | 50 }; |
51 | 51 |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); | 321 ASSERT_EQ(bb_node->GetChild(0)->url(), bb_node->GetChild(1)->url()); |
322 | 322 |
323 controller.reset(new BookmarkContextMenu( | 323 controller.reset(new BookmarkContextMenu( |
324 NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); | 324 NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); |
325 // Cut the URL. | 325 // Cut the URL. |
326 controller->ExecuteCommand(IDC_CUT); | 326 controller->ExecuteCommand(IDC_CUT); |
327 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); | 327 ASSERT_TRUE(bb_node->GetChild(0)->is_url()); |
328 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); | 328 ASSERT_TRUE(bb_node->GetChild(1)->is_folder()); |
329 ASSERT_EQ(old_count, bb_node->child_count()); | 329 ASSERT_EQ(old_count, bb_node->child_count()); |
330 } | 330 } |
OLD | NEW |