| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 __PLATFORM_WINDOW_MANAGER_MOCK_X_CONNECTION_H__ | 5 #ifndef WINDOW_MANAGER_MOCK_X_CONNECTION_H_ |
| 6 #define __PLATFORM_WINDOW_MANAGER_MOCK_X_CONNECTION_H__ | 6 #define WINDOW_MANAGER_MOCK_X_CONNECTION_H_ |
| 7 | 7 |
| 8 #include <tr1/memory> | 8 #include <tr1/memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 | 12 |
| 13 #include "window_manager/x_connection.h" | 13 #include "window_manager/x_connection.h" |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace window_manager { |
| 16 | 16 |
| 17 // This is a fake implementation of a connection to an X server. | 17 // This is a fake implementation of a connection to an X server. |
| 18 class MockXConnection : public XConnection { | 18 class MockXConnection : public XConnection { |
| 19 public: | 19 public: |
| 20 MockXConnection(); | 20 MockXConnection(); |
| 21 ~MockXConnection(); | 21 ~MockXConnection(); |
| 22 | 22 |
| 23 bool GetWindowGeometry(XWindow xid, int* x, int* y, int* width, int* height); | 23 bool GetWindowGeometry(XWindow xid, int* x, int* y, int* width, int* height); |
| 24 bool MapWindow(XWindow xid); | 24 bool MapWindow(XWindow xid); |
| 25 bool UnmapWindow(XWindow xid); | 25 bool UnmapWindow(XWindow xid); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 std::map<XAtom, std::string> atom_to_name_; | 192 std::map<XAtom, std::string> atom_to_name_; |
| 193 std::map<XAtom, XWindow> selection_owners_; | 193 std::map<XAtom, XWindow> selection_owners_; |
| 194 XWindow focused_xid_; | 194 XWindow focused_xid_; |
| 195 | 195 |
| 196 // Window that has currently grabbed the pointer, or None. | 196 // Window that has currently grabbed the pointer, or None. |
| 197 XWindow pointer_grab_xid_; | 197 XWindow pointer_grab_xid_; |
| 198 | 198 |
| 199 DISALLOW_COPY_AND_ASSIGN(MockXConnection); | 199 DISALLOW_COPY_AND_ASSIGN(MockXConnection); |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 } // namespace chromeos | 202 } // namespace window_manager |
| 203 | 203 |
| 204 #endif | 204 #endif |
| OLD | NEW |