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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_gtk.h

Issue 147245: Linux web drag first cut.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: connect once Created 11 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents_view_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const NotificationSource& source, 74 const NotificationSource& source,
75 const NotificationDetails& details); 75 const NotificationDetails& details);
76 76
77 private: 77 private:
78 // Insert the given widget into the content area. Should only be used for 78 // Insert the given widget into the content area. Should only be used for
79 // web pages and the like (including interstitials and sad tab). Note that 79 // web pages and the like (including interstitials and sad tab). Note that
80 // this will be perfectly happy to insert overlapping render views, so care 80 // this will be perfectly happy to insert overlapping render views, so care
81 // should be taken that the correct one is hidden/shown. 81 // should be taken that the correct one is hidden/shown.
82 void InsertIntoContentArea(GtkWidget* widget); 82 void InsertIntoContentArea(GtkWidget* widget);
83 83
84 // Tell webkit the drag is over.
85 void DragEnded();
86
84 // We keep track of the timestamp of the latest mousedown event. 87 // We keep track of the timestamp of the latest mousedown event.
85 static gboolean OnMouseDown(GtkWidget* widget, 88 static gboolean OnMouseDown(GtkWidget* widget,
86 GdkEventButton* event, TabContentsViewGtk* view); 89 GdkEventButton* event, TabContentsViewGtk* view);
87 90
88 // Used to propagate size changes on |fixed_| to its children. 91 // Used to propagate size changes on |fixed_| to its children.
89 static gboolean OnSizeAllocate(GtkWidget* widget, 92 static gboolean OnSizeAllocate(GtkWidget* widget,
90 GtkAllocation* config, 93 GtkAllocation* config,
91 TabContentsViewGtk* view); 94 TabContentsViewGtk* view);
92 95
93 static void OnSetFloatingPosition( 96 static void OnSetFloatingPosition(
94 GtkFloatingContainer* floating_container, GtkAllocation* allocation, 97 GtkFloatingContainer* floating_container, GtkAllocation* allocation,
95 TabContentsViewGtk* tab_contents_view); 98 TabContentsViewGtk* tab_contents_view);
96 99
100 // Webkit DnD.
tony 2009/06/26 23:55:18 Nit: Renderer I think is more accurate.
101 static void OnDragEnd(GtkWidget* widget, GdkDragContext* drag_context,
102 TabContentsViewGtk* tab_contents_view);
103 static void OnDragDataGet(GtkWidget* drag_widget,
104 GdkDragContext* context, GtkSelectionData* selection_data,
105 guint target_type, guint time, TabContentsViewGtk* view);
106
97 // Contains |fixed_| as its GtkBin member and a possible floating widget from 107 // Contains |fixed_| as its GtkBin member and a possible floating widget from
98 // |popup_view_|. 108 // |popup_view_|.
99 OwnedWidgetGtk floating_; 109 OwnedWidgetGtk floating_;
100 110
101 // This container holds the tab's web page views. It is a GtkFixed so that we 111 // This container holds the tab's web page views. It is a GtkFixed so that we
102 // can control the size of the web pages. 112 // can control the size of the web pages.
103 GtkWidget* fixed_; 113 GtkWidget* fixed_;
104 114
105 // The context menu is reset every time we show it, but we keep a pointer to 115 // The context menu is reset every time we show it, but we keep a pointer to
106 // between uses so that it won't go out of scope before we're done with it. 116 // between uses so that it won't go out of scope before we're done with it.
(...skipping 11 matching lines...) Expand all
118 FocusStoreGtk focus_store_; 128 FocusStoreGtk focus_store_;
119 129
120 // Our UI for controlling popups (or NULL if no popup windows have been 130 // Our UI for controlling popups (or NULL if no popup windows have been
121 // opened). |popup_view_| is owned by the TabContents, not the view. 131 // opened). |popup_view_| is owned by the TabContents, not the view.
122 BlockedPopupContainerViewGtk* popup_view_; 132 BlockedPopupContainerViewGtk* popup_view_;
123 133
124 // Each individual UI for constrained dialogs currently displayed. The 134 // Each individual UI for constrained dialogs currently displayed. The
125 // objects in this vector are owned by the TabContents, not the view. 135 // objects in this vector are owned by the TabContents, not the view.
126 std::vector<ConstrainedWindowGtk*> constrained_windows_; 136 std::vector<ConstrainedWindowGtk*> constrained_windows_;
127 137
138 // The drop data for the current drag (for drags that originate in the render
139 // view).
140 scoped_ptr<WebDropData> drop_data_;
141
128 DISALLOW_COPY_AND_ASSIGN(TabContentsViewGtk); 142 DISALLOW_COPY_AND_ASSIGN(TabContentsViewGtk);
129 }; 143 };
130 144
131 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ 145 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698