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

Side by Side Diff: remoting/host/win/rdp_client_window.cc

Issue 112453002: Remove dependency on skia from remoting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « remoting/host/win/rdp_client_window.h ('k') | remoting/host/win/rdp_desktop_session.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "remoting/host/win/rdp_client_window.h" 5 #include "remoting/host/win/rdp_client_window.h"
6 6
7 #include <wtsdefs.h> 7 #include <wtsdefs.h>
8 8
9 #include <list> 9 #include <list>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 HHOOK hook_; 108 HHOOK hook_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(WindowHook); 110 DISALLOW_COPY_AND_ASSIGN(WindowHook);
111 }; 111 };
112 112
113 RdpClientWindow::RdpClientWindow(const net::IPEndPoint& server_endpoint, 113 RdpClientWindow::RdpClientWindow(const net::IPEndPoint& server_endpoint,
114 const std::string& terminal_id, 114 const std::string& terminal_id,
115 EventHandler* event_handler) 115 EventHandler* event_handler)
116 : event_handler_(event_handler), 116 : event_handler_(event_handler),
117 screen_size_(SkISize::Make(0, 0)),
118 server_endpoint_(server_endpoint), 117 server_endpoint_(server_endpoint),
119 terminal_id_(terminal_id) { 118 terminal_id_(terminal_id) {
120 } 119 }
121 120
122 RdpClientWindow::~RdpClientWindow() { 121 RdpClientWindow::~RdpClientWindow() {
123 if (m_hWnd) 122 if (m_hWnd)
124 DestroyWindow(); 123 DestroyWindow();
125 124
126 DCHECK(!client_); 125 DCHECK(!client_);
127 DCHECK(!client_settings_); 126 DCHECK(!client_settings_);
128 } 127 }
129 128
130 bool RdpClientWindow::Connect(const SkISize& screen_size) { 129 bool RdpClientWindow::Connect(const webrtc::DesktopSize& screen_size) {
131 DCHECK(!m_hWnd); 130 DCHECK(!m_hWnd);
132 131
133 screen_size_ = screen_size; 132 screen_size_ = screen_size;
134 RECT rect = { 0, 0, screen_size_.width(), screen_size_.height() }; 133 RECT rect = { 0, 0, screen_size_.width(), screen_size_.height() };
135 bool result = Create(NULL, rect, NULL) != NULL; 134 bool result = Create(NULL, rect, NULL) != NULL;
136 135
137 // Hide the window since this class is about establishing a connection, not 136 // Hide the window since this class is about establishing a connection, not
138 // about showing a UI to the user. 137 // about showing a UI to the user.
139 if (result) 138 if (result)
140 ShowWindow(SW_HIDE); 139 ShowWindow(SW_HIDE);
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 return CallNextHookEx(hook, code, wparam, lparam); 520 return CallNextHookEx(hook, code, wparam, lparam);
522 521
523 // Close the window once all pending window messages are processed. 522 // Close the window once all pending window messages are processed.
524 HWND window = reinterpret_cast<HWND>(wparam); 523 HWND window = reinterpret_cast<HWND>(wparam);
525 LOG(WARNING) << "RDP: closing a window: " << std::hex << window << std::dec; 524 LOG(WARNING) << "RDP: closing a window: " << std::hex << window << std::dec;
526 ::PostMessage(window, WM_CLOSE, 0, 0); 525 ::PostMessage(window, WM_CLOSE, 0, 0);
527 return 0; 526 return 0;
528 } 527 }
529 528
530 } // namespace remoting 529 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/rdp_client_window.h ('k') | remoting/host/win/rdp_desktop_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698