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

Side by Side Diff: chrome/browser/gtk/bookmark_editor_gtk.cc

Issue 115831: Converts a bunch things from NativeWindow to NativeView to make it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/bookmark_editor_gtk.h" 5 #include "chrome/browser/gtk/bookmark_editor_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 15 matching lines...) Expand all
26 // Background color of text field when URL is invalid. 26 // Background color of text field when URL is invalid.
27 const GdkColor kErrorColor = GDK_COLOR_RGB(0xFF, 0xBC, 0xBC); 27 const GdkColor kErrorColor = GDK_COLOR_RGB(0xFF, 0xBC, 0xBC);
28 28
29 // Preferred initial dimensions, in pixels, of the folder tree. 29 // Preferred initial dimensions, in pixels, of the folder tree.
30 static const int kTreeWidth = 300; 30 static const int kTreeWidth = 300;
31 static const int kTreeHeight = 150; 31 static const int kTreeHeight = 150;
32 32
33 } // namespace 33 } // namespace
34 34
35 // static 35 // static
36 void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd, 36 void BookmarkEditor::Show(gfx::NativeView parent_hwnd,
37 Profile* profile, 37 Profile* profile,
38 BookmarkNode* parent, 38 BookmarkNode* parent,
39 BookmarkNode* node, 39 BookmarkNode* node,
40 Configuration configuration, 40 Configuration configuration,
41 Handler* handler) { 41 Handler* handler) {
42 DCHECK(profile); 42 DCHECK(profile);
43 BookmarkEditorGtk* editor = 43 BookmarkEditorGtk* editor =
44 new BookmarkEditorGtk(parent_hwnd, profile, parent, node, configuration, 44 new BookmarkEditorGtk(GTK_WINDOW(gtk_widget_get_toplevel(parent_hwnd)),
45 handler); 45 profile, parent, node, configuration, handler);
46 editor->Show(); 46 editor->Show();
47 } 47 }
48 48
49 BookmarkEditorGtk::BookmarkEditorGtk( 49 BookmarkEditorGtk::BookmarkEditorGtk(
50 GtkWindow* window, 50 GtkWindow* window,
51 Profile* profile, 51 Profile* profile,
52 BookmarkNode* parent, 52 BookmarkNode* parent,
53 BookmarkNode* node, 53 BookmarkNode* node,
54 BookmarkEditor::Configuration configuration, 54 BookmarkEditor::Configuration configuration,
55 BookmarkEditor::Handler* handler) 55 BookmarkEditor::Handler* handler)
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 GtkTreeIter new_item_iter; 395 GtkTreeIter new_item_iter;
396 dialog->AddNewGroup(&iter, &new_item_iter); 396 dialog->AddNewGroup(&iter, &new_item_iter);
397 397
398 GtkTreePath* path = gtk_tree_model_get_path( 398 GtkTreePath* path = gtk_tree_model_get_path(
399 GTK_TREE_MODEL(dialog->tree_store_), &new_item_iter); 399 GTK_TREE_MODEL(dialog->tree_store_), &new_item_iter);
400 gtk_tree_view_expand_to_path(GTK_TREE_VIEW(dialog->tree_view_), path); 400 gtk_tree_view_expand_to_path(GTK_TREE_VIEW(dialog->tree_view_), path);
401 gtk_tree_selection_select_path(dialog->tree_selection_, path); 401 gtk_tree_selection_select_path(dialog->tree_selection_, path);
402 gtk_tree_path_free(path); 402 gtk_tree_path_free(path);
403 } 403 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/bookmark_bar_gtk.cc ('k') | chrome/browser/gtk/bookmark_menu_controller_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698