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

Side by Side Diff: chrome/browser/ui/aura/tabs/dock_info_auralinux.cc

Issue 29493004: browser: Enable DockInfo for Aura Linux besides X11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: using auralinux.cc this time Created 7 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/aura/tabs/dock_info_aurax11.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) 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 "chrome/browser/ui/host_desktop.h" 7 #include "chrome/browser/ui/host_desktop.h"
8 #include "ui/aura/root_window.h" 8 #include "ui/aura/root_window.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #if defined(USE_X11)
10 #include "ui/base/x/x11_util.h" 11 #include "ui/base/x/x11_util.h"
11
12 #if !defined(OS_CHROMEOS)
13 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h"
14 #endif 12 #endif
15 13
16 #if !defined(OS_CHROMEOS) 14 #if !defined(OS_CHROMEOS) && defined(USE_X11)
15 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h"
17 16
18 namespace { 17 namespace {
19 18
20 //////////////////////////////////////////////////////////////////////////////// 19 ////////////////////////////////////////////////////////////////////////////////
21 // BaseWindowFinder 20 // BaseWindowFinder
22 // 21 //
23 // Base class used to locate a window. A subclass need only override 22 // Base class used to locate a window. A subclass need only override
24 // ShouldStopIterating to determine when iteration should stop. 23 // ShouldStopIterating to determine when iteration should stop.
25 class BaseWindowFinder : public ui::EnumerateWindowsDelegate { 24 class BaseWindowFinder : public ui::EnumerateWindowsDelegate {
26 public: 25 public:
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // The resulting window. This is initially null but set to true in 168 // The resulting window. This is initially null but set to true in
170 // ShouldStopIterating if an appropriate window is found. 169 // ShouldStopIterating if an appropriate window is found.
171 XID result_; 170 XID result_;
172 171
173 DISALLOW_COPY_AND_ASSIGN(LocalProcessWindowFinder); 172 DISALLOW_COPY_AND_ASSIGN(LocalProcessWindowFinder);
174 }; 173 };
175 174
176 } // namespace 175 } // namespace
177 176
178 // static 177 // static
179 DockInfo DockInfo::GetDockInfoAtPoint(chrome::HostDesktopType host_desktop_type,
180 const gfx::Point& screen_point,
181 const std::set<gfx::NativeView>& ignore) {
182 // TODO(beng):
183 NOTIMPLEMENTED();
184 return DockInfo();
185 }
186
187 // static
188 gfx::NativeView DockInfo::GetLocalProcessWindowAtPoint( 178 gfx::NativeView DockInfo::GetLocalProcessWindowAtPoint(
189 chrome::HostDesktopType host_desktop_type, 179 chrome::HostDesktopType host_desktop_type,
190 const gfx::Point& screen_point, 180 const gfx::Point& screen_point,
191 const std::set<gfx::NativeView>& ignore) { 181 const std::set<gfx::NativeView>& ignore) {
192 // The X11 server is the canonical state of what the window stacking order 182 // The X11 server is the canonical state of what the window stacking order
193 // is. 183 // is.
194 XID xid = 184 XID xid =
195 LocalProcessWindowFinder::GetProcessWindowAtPoint(screen_point, ignore); 185 LocalProcessWindowFinder::GetProcessWindowAtPoint(screen_point, ignore);
196 return views::DesktopRootWindowHostX11::GetContentWindowForXID(xid); 186 return views::DesktopRootWindowHostX11::GetContentWindowForXID(xid);
197 } 187 }
188 #else
189 // static
190 gfx::NativeView DockInfo::GetLocalProcessWindowAtPoint(
191 chrome::HostDesktopType host_desktop_type,
192 const gfx::Point& screen_point,
193 const std::set<gfx::NativeView>& ignore) {
194
195 // TODO(vignatti):
196 NOTIMPLEMENTED();
197 return NULL;
198 }
199 #endif
200
201 // static
202 DockInfo DockInfo::GetDockInfoAtPoint(chrome::HostDesktopType host_desktop_type,
203 const gfx::Point& screen_point,
204 const std::set<gfx::NativeView>& ignore) {
205 // TODO(beng):
206 NOTIMPLEMENTED();
207 return DockInfo();
208 }
198 209
199 bool DockInfo::GetWindowBounds(gfx::Rect* bounds) const { 210 bool DockInfo::GetWindowBounds(gfx::Rect* bounds) const {
200 if (!window()) 211 if (!window())
201 return false; 212 return false;
202 *bounds = window_->bounds(); 213 *bounds = window_->bounds();
203 return true; 214 return true;
204 } 215 }
205 216
206 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const { 217 void DockInfo::SizeOtherWindowTo(const gfx::Rect& bounds) const {
207 window_->SetBounds(bounds); 218 window_->SetBounds(bounds);
208 } 219 }
209
210 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/aura/tabs/dock_info_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698