| OLD | NEW |
| 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 #ifndef UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 5 #ifndef UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
| 6 #define UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 6 #define UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 // Manually sets the instance to be used as a return value of |Instance()| | 114 // Manually sets the instance to be used as a return value of |Instance()| |
| 115 // method above. This should not be called if the instance has already | 115 // method above. This should not be called if the instance has already |
| 116 // been set or created, and doing so will result in CHECK failure. | 116 // been set or created, and doing so will result in CHECK failure. |
| 117 static void SetInstance(RemoteWindowTreeHostWin* instance); | 117 static void SetInstance(RemoteWindowTreeHostWin* instance); |
| 118 | 118 |
| 119 // Returns true if there is a RemoteWindowTreeHostWin and it has a valid | 119 // Returns true if there is a RemoteWindowTreeHostWin and it has a valid |
| 120 // HWND. A return value of false typically indicates we're not in metro mode. | 120 // HWND. A return value of false typically indicates we're not in metro mode. |
| 121 static bool IsValid(); | 121 static bool IsValid(); |
| 122 | 122 |
| 123 // Sets the handle to the remote window. The |remote_window| is the actual | 123 // Sets the handle to the remote window and the scale factor. The |
| 124 // window owned by the viewer process. Call this before Connected() for some | 124 // |remote_window| is the actual window owned by the viewer process. Call |
| 125 // customers like input method initialization which needs the handle. | 125 // this before Connected() for some customers like input method |
| 126 void SetRemoteWindowHandle(HWND remote_window); | 126 // initialization which needs the handle. |
| 127 // |device_scale| indicates the Windows 8 dpi scale. |
| 128 void InitializeRemoteWindowAndScaleFactor(HWND remote_window, |
| 129 float device_scale); |
| 127 | 130 |
| 128 // The |host| can be used when we need to send a message to it. | 131 // The |host| can be used when we need to send a message to it. |
| 129 void Connected(IPC::Sender* host); | 132 void Connected(IPC::Sender* host); |
| 130 // Called when the remote process has closed its IPC connection. | 133 // Called when the remote process has closed its IPC connection. |
| 131 void Disconnected(); | 134 void Disconnected(); |
| 132 | 135 |
| 133 // Called when we have a message from the remote process. | 136 // Called when we have a message from the remote process. |
| 134 bool OnMessageReceived(const IPC::Message& message); | 137 bool OnMessageReceived(const IPC::Message& message); |
| 135 | 138 |
| 136 void HandleOpenURLOnDesktop(const base::FilePath& shortcut, | 139 void HandleOpenURLOnDesktop(const base::FilePath& shortcut, |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 302 |
| 300 // Current size of this root window. | 303 // Current size of this root window. |
| 301 gfx::Size window_size_; | 304 gfx::Size window_size_; |
| 302 | 305 |
| 303 DISALLOW_COPY_AND_ASSIGN(RemoteWindowTreeHostWin); | 306 DISALLOW_COPY_AND_ASSIGN(RemoteWindowTreeHostWin); |
| 304 }; | 307 }; |
| 305 | 308 |
| 306 } // namespace aura | 309 } // namespace aura |
| 307 | 310 |
| 308 #endif // UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ | 311 #endif // UI_AURA_REMOTE_WINDOW_TREE_HOST_WIN_H_ |
| OLD | NEW |