Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7270)

Unified Diff: chrome/browser/gtk/bookmark_manager_gtk.h

Issue 118150: Linux bookmark manager first cut. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 1 more file Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/bookmark_editor_gtk.cc ('k') | chrome/browser/gtk/bookmark_manager_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_manager_gtk.h
===================================================================
--- chrome/browser/gtk/bookmark_manager_gtk.h (revision 0)
+++ chrome/browser/gtk/bookmark_manager_gtk.h (revision 0)
@@ -0,0 +1,79 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.TIT
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_
+#define CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_
+
+#include <gtk/gtk.h>
+
+#include "chrome/browser/bookmarks/bookmark_model.h"
+
+class BookmarkModel;
+class Profile;
+
+class BookmarkManagerGtk : public BookmarkModelObserver {
+ public:
+ virtual ~BookmarkManagerGtk();
+
+ Profile* profile() { return profile_; }
+
+ // Show the node in the tree.
+ static void SelectInTree(BookmarkNode* node);
+
+ // Shows the bookmark manager. Only one bookmark manager exists.
+ static void Show(Profile* profile);
+
+ // BookmarkModelObserver implementation.
+ virtual void Loaded(BookmarkModel* model);
+ virtual void BookmarkModelBeingDeleted(BookmarkModel* model);
+ // TODO(estade): Implement these.
+ virtual void BookmarkNodeMoved(BookmarkModel* model,
+ BookmarkNode* old_parent,
+ int old_index,
+ BookmarkNode* new_parent,
+ int new_index) {}
+ virtual void BookmarkNodeAdded(BookmarkModel* model,
+ BookmarkNode* parent,
+ int index) {}
+ virtual void BookmarkNodeRemoved(BookmarkModel* model,
+ BookmarkNode* parent,
+ int index) {}
+ virtual void BookmarkNodeRemoved(BookmarkModel* model,
+ BookmarkNode* parent,
+ int old_index,
+ BookmarkNode* node) {}
+ virtual void BookmarkNodeChanged(BookmarkModel* model,
+ BookmarkNode* node) {}
+ virtual void BookmarkNodeChildrenReordered(BookmarkModel* model,
+ BookmarkNode* node) {}
+ virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model,
+ BookmarkNode* node) {}
+
+ private:
+ explicit BookmarkManagerGtk(Profile* profile);
+
+ void InitWidgets();
+ GtkWidget* MakeLeftPane();
+ GtkWidget* MakeRightPane();
+
+ // Pack the data from the bookmark model into the stores. This does not
+ // create the stores, which is done in Make{Left,Right}Pane(). These should
+ // only be called once (when the bookmark model is loaded).
+ void BuildLeftStore();
+ void BuildRightStore();
+
+ GtkWidget* window_;
+ Profile* profile_;
+ BookmarkModel* model_;
+
+ enum {
+ RIGHT_PANE_TITLE,
+ RIGHT_PANE_URL,
+ RIGHT_PANE_NUM
+ };
+ GtkTreeStore* left_store_;
+ GtkListStore* right_store_;
+};
+
+#endif // CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_
« no previous file with comments | « chrome/browser/gtk/bookmark_editor_gtk.cc ('k') | chrome/browser/gtk/bookmark_manager_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698