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

Side by Side Diff: remoting/host/disconnect_window_win.cc

Issue 13642007: Rewrite scoped_array<T> to scoped_ptr<T[]> in remoting/, Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Manually rewrite Win files. Created 7 years, 8 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 | « remoting/codec/video_encoder_vp8.h ('k') | remoting/host/input_injector_linux.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 <windows.h> 5 #include <windows.h>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 return false; 224 return false;
225 225
226 DLGTEMPLATE* dialog_pointer = 226 DLGTEMPLATE* dialog_pointer =
227 reinterpret_cast<DLGTEMPLATE*>(LockResource(dialog_template)); 227 reinterpret_cast<DLGTEMPLATE*>(LockResource(dialog_template));
228 if (!dialog_pointer) 228 if (!dialog_pointer)
229 return false; 229 return false;
230 230
231 // The actual resource type is DLGTEMPLATEEX, but this is not defined in any 231 // The actual resource type is DLGTEMPLATEEX, but this is not defined in any
232 // standard headers, so we treat it as a generic pointer and manipulate the 232 // standard headers, so we treat it as a generic pointer and manipulate the
233 // correct offsets explicitly. 233 // correct offsets explicitly.
234 scoped_array<unsigned char> rtl_dialog_template; 234 scoped_ptr<unsigned char[]> rtl_dialog_template;
235 if (ui_strings_.direction == UiStrings::RTL) { 235 if (ui_strings_.direction == UiStrings::RTL) {
236 unsigned long dialog_template_size = 236 unsigned long dialog_template_size =
237 SizeofResource(module, dialog_resource); 237 SizeofResource(module, dialog_resource);
238 rtl_dialog_template.reset(new unsigned char[dialog_template_size]); 238 rtl_dialog_template.reset(new unsigned char[dialog_template_size]);
239 memcpy(rtl_dialog_template.get(), dialog_pointer, dialog_template_size); 239 memcpy(rtl_dialog_template.get(), dialog_pointer, dialog_template_size);
240 DWORD* rtl_dwords = reinterpret_cast<DWORD*>(rtl_dialog_template.get()); 240 DWORD* rtl_dwords = reinterpret_cast<DWORD*>(rtl_dialog_template.get());
241 rtl_dwords[2] |= (WS_EX_LAYOUTRTL | WS_EX_RTLREADING); 241 rtl_dwords[2] |= (WS_EX_LAYOUTRTL | WS_EX_RTLREADING);
242 dialog_pointer = reinterpret_cast<DLGTEMPLATE*>(rtl_dwords); 242 dialog_pointer = reinterpret_cast<DLGTEMPLATE*>(rtl_dwords);
243 } 243 }
244 244
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 } // namespace 391 } // namespace
392 392
393 // static 393 // static
394 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow( 394 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow(
395 const UiStrings& ui_strings) { 395 const UiStrings& ui_strings) {
396 return scoped_ptr<HostWindow>(new DisconnectWindowWin(ui_strings)); 396 return scoped_ptr<HostWindow>(new DisconnectWindowWin(ui_strings));
397 } 397 }
398 398
399 } // namespace remoting 399 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/codec/video_encoder_vp8.h ('k') | remoting/host/input_injector_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698