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

Side by Side Diff: chrome/browser/ui/gtk/tabs/dock_info_gtk.cc

Issue 10560014: Aura desktop: Fix tab dragging within a single chrome window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix filename so windows is excluded. Created 8 years, 6 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 | « chrome/browser/ui/gtk/gtk_util.cc ('k') | chrome/chrome_browser.gypi » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/tabs/dock_info.h" 5 #include "chrome/browser/ui/tabs/dock_info.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 private: 95 private:
96 TopMostFinder(XID window, 96 TopMostFinder(XID window,
97 const gfx::Point& screen_loc, 97 const gfx::Point& screen_loc,
98 const std::set<GtkWidget*>& ignore) 98 const std::set<GtkWidget*>& ignore)
99 : BaseWindowFinder(ignore), 99 : BaseWindowFinder(ignore),
100 target_(window), 100 target_(window),
101 screen_loc_(screen_loc), 101 screen_loc_(screen_loc),
102 is_top_most_(false) { 102 is_top_most_(false) {
103 gtk_util::EnumerateTopLevelWindows(this); 103 ui::EnumerateTopLevelWindows(this);
104 } 104 }
105 105
106 // The window we're looking for. 106 // The window we're looking for.
107 XID target_; 107 XID target_;
108 108
109 // Location of window to find. 109 // Location of window to find.
110 gfx::Point screen_loc_; 110 gfx::Point screen_loc_;
111 111
112 // Is target_ the top most window? This is initially false but set to true 112 // Is target_ the top most window? This is initially false but set to true
113 // in ShouldStopIterating if target_ is passed in. 113 // in ShouldStopIterating if target_ is passed in.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 return false; 157 return false;
158 } 158 }
159 159
160 private: 160 private:
161 LocalProcessWindowFinder(const gfx::Point& screen_loc, 161 LocalProcessWindowFinder(const gfx::Point& screen_loc,
162 const std::set<GtkWidget*>& ignore) 162 const std::set<GtkWidget*>& ignore)
163 : BaseWindowFinder(ignore), 163 : BaseWindowFinder(ignore),
164 screen_loc_(screen_loc), 164 screen_loc_(screen_loc),
165 result_(0) { 165 result_(0) {
166 gtk_util::EnumerateTopLevelWindows(this); 166 ui::EnumerateTopLevelWindows(this);
167 } 167 }
168 168
169 // Position of the mouse. 169 // Position of the mouse.
170 gfx::Point screen_loc_; 170 gfx::Point screen_loc_;
171 171
172 // The resulting window. This is initially null but set to true in 172 // The resulting window. This is initially null but set to true in
173 // ShouldStopIterating if an appropriate window is found. 173 // ShouldStopIterating if an appropriate window is found.
174 XID result_; 174 XID result_;
175 175
176 DISALLOW_COPY_AND_ASSIGN(LocalProcessWindowFinder); 176 DISALLOW_COPY_AND_ASSIGN(LocalProcessWindowFinder);
(...skipping 23 matching lines...) Expand all
200 gtk_window_get_position(window(), &x, &y); 200 gtk_window_get_position(window(), &x, &y);
201 gtk_window_get_size(window(), &w, &h); 201 gtk_window_get_size(window(), &w, &h);
202 bounds->SetRect(x, y, w, h); 202 bounds->SetRect(x, y, w, h);
203 return true; 203 return true;
204 } 204 }
205 205
206 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const { 206 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const {
207 gtk_window_move(window(), bounds.x(), bounds.y()); 207 gtk_window_move(window(), bounds.x(), bounds.y());
208 gtk_window_resize(window(), bounds.width(), bounds.height()); 208 gtk_window_resize(window(), bounds.width(), bounds.height());
209 } 209 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698