| 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 "chrome/browser/bookmarks/bookmark_utils.h" | 5 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // opening a url and there is no Browser open. The Browser is created the first | 59 // opening a url and there is no Browser open. The Browser is created the first |
| 60 // time the PageNavigator method is invoked. | 60 // time the PageNavigator method is invoked. |
| 61 class NewBrowserPageNavigator : public PageNavigator { | 61 class NewBrowserPageNavigator : public PageNavigator { |
| 62 public: | 62 public: |
| 63 explicit NewBrowserPageNavigator(Profile* profile) | 63 explicit NewBrowserPageNavigator(Profile* profile) |
| 64 : profile_(profile), | 64 : profile_(profile), |
| 65 browser_(NULL) {} | 65 browser_(NULL) {} |
| 66 | 66 |
| 67 virtual ~NewBrowserPageNavigator() { | 67 virtual ~NewBrowserPageNavigator() { |
| 68 if (browser_) | 68 if (browser_) |
| 69 browser_->window()->Show(); | 69 browser_->window()->Show(BrowserWindow::SHOW_CONTEXT_NORMAL); |
| 70 } | 70 } |
| 71 | 71 |
| 72 Browser* browser() const { return browser_; } | 72 Browser* browser() const { return browser_; } |
| 73 | 73 |
| 74 // Deprecated. Please use one-argument variant. | 74 // Deprecated. Please use one-argument variant. |
| 75 // TODO(adriansc): Remove this method once refactoring changed all call sites. | 75 // TODO(adriansc): Remove this method once refactoring changed all call sites. |
| 76 virtual TabContents* OpenURL(const GURL& url, | 76 virtual TabContents* OpenURL(const GURL& url, |
| 77 const GURL& referrer, | 77 const GURL& referrer, |
| 78 WindowOpenDisposition disposition, | 78 WindowOpenDisposition disposition, |
| 79 PageTransition::Type transition) OVERRIDE { | 79 PageTransition::Type transition) OVERRIDE { |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 ++iter) { | 746 ++iter) { |
| 747 const BookmarkNode* node = model->GetNodeByID(*iter); | 747 const BookmarkNode* node = model->GetNodeByID(*iter); |
| 748 if (!node) | 748 if (!node) |
| 749 continue; | 749 continue; |
| 750 const BookmarkNode* parent = node->parent(); | 750 const BookmarkNode* parent = node->parent(); |
| 751 model->Remove(parent, parent->GetIndexOf(node)); | 751 model->Remove(parent, parent->GetIndexOf(node)); |
| 752 } | 752 } |
| 753 } | 753 } |
| 754 | 754 |
| 755 } // namespace bookmark_utils | 755 } // namespace bookmark_utils |
| OLD | NEW |