Index: chrome/browser/bookmarks/bookmark_editor.cc |
=================================================================== |
--- chrome/browser/bookmarks/bookmark_editor.cc (revision 101584) |
+++ chrome/browser/bookmarks/bookmark_editor.cc (working copy) |
@@ -1,52 +1,20 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
#include "chrome/browser/bookmarks/bookmark_editor.h" |
-#include "chrome/browser/bookmarks/bookmark_model.h" |
-#include "chrome/browser/ui/webui/chrome_web_ui.h" |
-BookmarkEditor::EditDetails::EditDetails(Type node_type) |
- : type(node_type) { |
-} |
+#include "googleurl/src/gurl.h" |
-BookmarkEditor::EditDetails BookmarkEditor::EditDetails::EditNode( |
- const BookmarkNode* node) { |
- EditDetails details(EXISTING_NODE); |
- details.existing_node = node; |
- return details; |
+BookmarkEditor::EditDetails::EditDetails() |
+ : type(NEW_URL), |
+ existing_node(NULL) { |
} |
-BookmarkEditor::EditDetails BookmarkEditor::EditDetails::AddNodeInFolder( |
- const BookmarkNode* parent_node) { |
- EditDetails details(NEW_URL); |
- details.parent_node = parent_node; |
- return details; |
+BookmarkEditor::EditDetails::EditDetails(const BookmarkNode* node) |
+ : type(EXISTING_NODE), |
+ existing_node(node) { |
} |
-BookmarkEditor::EditDetails BookmarkEditor::EditDetails::AddFolder( |
- const BookmarkNode* parent_node) { |
- EditDetails details(NEW_FOLDER); |
- details.parent_node = parent_node; |
- return details; |
-} |
- |
BookmarkEditor::EditDetails::~EditDetails() { |
} |
- |
-void BookmarkEditor::Show(gfx::NativeWindow parent_window, |
- Profile* profile, |
- const EditDetails& details, |
- Configuration configuration) { |
- // TODO(flackr): Implement NEW_FOLDER type in WebUI and remove the type check. |
- if (ChromeWebUI::IsMoreWebUI() && ( |
- details.type == EditDetails::EXISTING_NODE || |
- details.type == EditDetails::NEW_URL)) { |
- ShowWebUI(profile, details); |
- return; |
- } |
- |
- // Delegate to the platform native bookmark editor code. |
- ShowNative(parent_window, profile, details.parent_node, details, |
- configuration); |
-} |