| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.TIT | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.TIT |
| 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 #ifndef CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ | 6 #define CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/gfx/rect.h" | 12 #include "base/gfx/rect.h" |
| 13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
| 14 #include "base/task.h" | 14 #include "base/task.h" |
| 15 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 15 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
| 16 #include "chrome/browser/gtk/bookmark_context_menu.h" | 16 #include "chrome/browser/gtk/bookmark_context_menu_gtk.h" |
| 17 #include "chrome/browser/shell_dialogs.h" | 17 #include "chrome/browser/shell_dialogs.h" |
| 18 #include "chrome/common/gtk_tree.h" | 18 #include "chrome/common/gtk_tree.h" |
| 19 #include "testing/gtest/include/gtest/gtest_prod.h" | 19 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 20 | 20 |
| 21 class BookmarkModel; | 21 class BookmarkModel; |
| 22 class BookmarkTableModel; | 22 class BookmarkTableModel; |
| 23 class Profile; | 23 class Profile; |
| 24 | 24 |
| 25 class BookmarkManagerGtk : public BookmarkModelObserver, | 25 class BookmarkManagerGtk : public BookmarkModelObserver, |
| 26 public gtk_tree::ModelAdapter::Delegate, | 26 public gtk_tree::ModelAdapter::Delegate, |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 320 |
| 321 // |window_|'s current position and size. | 321 // |window_|'s current position and size. |
| 322 gfx::Rect window_bounds_; | 322 gfx::Rect window_bounds_; |
| 323 | 323 |
| 324 // Flags describing |window_|'s current state. | 324 // Flags describing |window_|'s current state. |
| 325 GdkWindowState window_state_; | 325 GdkWindowState window_state_; |
| 326 | 326 |
| 327 // The Organize menu item. | 327 // The Organize menu item. |
| 328 GtkWidget* organize_; | 328 GtkWidget* organize_; |
| 329 // The submenu the item pops up. | 329 // The submenu the item pops up. |
| 330 #if defined(TOOLKIT_GTK) | 330 scoped_ptr<BookmarkContextMenuGtk> organize_menu_; |
| 331 scoped_ptr<BookmarkContextMenu> organize_menu_; | |
| 332 #endif | |
| 333 // Whether the menu refers to the left selection. | 331 // Whether the menu refers to the left selection. |
| 334 bool organize_is_for_left_; | 332 bool organize_is_for_left_; |
| 335 | 333 |
| 336 // Factory used for delaying search. | 334 // Factory used for delaying search. |
| 337 ScopedRunnableMethodFactory<BookmarkManagerGtk> search_factory_; | 335 ScopedRunnableMethodFactory<BookmarkManagerGtk> search_factory_; |
| 338 | 336 |
| 339 scoped_refptr<SelectFileDialog> select_file_dialog_; | 337 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 340 | 338 |
| 341 // These variables are used for the workaround for http://crbug.com/15240. | 339 // These variables are used for the workaround for http://crbug.com/15240. |
| 342 // The last mouse down we got. Only valid while |delaying_mousedown| is true. | 340 // The last mouse down we got. Only valid while |delaying_mousedown| is true. |
| 343 GdkEventButton mousedown_event_; | 341 GdkEventButton mousedown_event_; |
| 344 bool delaying_mousedown_; | 342 bool delaying_mousedown_; |
| 345 // This is true while we are propagating a delayed mousedown. It is used to | 343 // This is true while we are propagating a delayed mousedown. It is used to |
| 346 // tell the button press handler to ignore the event. | 344 // tell the button press handler to ignore the event. |
| 347 bool sending_delayed_mousedown_; | 345 bool sending_delayed_mousedown_; |
| 348 | 346 |
| 349 // This is used to avoid recursively calling our right click handler. It is | 347 // This is used to avoid recursively calling our right click handler. It is |
| 350 // only true when a right click is already being handled. | 348 // only true when a right click is already being handled. |
| 351 bool ignore_rightclicks_; | 349 bool ignore_rightclicks_; |
| 352 | 350 |
| 353 GtkAccelGroup* accel_group_; | 351 GtkAccelGroup* accel_group_; |
| 354 }; | 352 }; |
| 355 | 353 |
| 356 #endif // CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ | 354 #endif // CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ |
| OLD | NEW |