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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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
« no previous file with comments | « remoting/host/win/chromoting_module.cc ('k') | services/catalog/catalog.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Play sounds at the remote computer. Equivalent to |kRdpAudioModeNone| if 54 // Play sounds at the remote computer. Equivalent to |kRdpAudioModeNone| if
55 // the remote computer is running a server SKU. 55 // the remote computer is running a server SKU.
56 kRdpAudioModePlayOnServer = 1, 56 kRdpAudioModePlayOnServer = 1,
57 57
58 // Disable sound redirection; do not play sounds at the remote computer. 58 // Disable sound redirection; do not play sounds at the remote computer.
59 kRdpAudioModeNone = 2 59 kRdpAudioModeNone = 2
60 }; 60 };
61 61
62 // Points to a per-thread instance of the window activation hook handle. 62 // Points to a per-thread instance of the window activation hook handle.
63 base::LazyInstance<base::ThreadLocalPointer<RdpClientWindow::WindowHook> > 63 base::LazyInstance<base::ThreadLocalPointer<RdpClientWindow::WindowHook>>::
64 g_window_hook = LAZY_INSTANCE_INITIALIZER; 64 DestructorAtExit g_window_hook = LAZY_INSTANCE_INITIALIZER;
65 65
66 // Finds a child window with the class name matching |class_name|. Unlike 66 // Finds a child window with the class name matching |class_name|. Unlike
67 // FindWindowEx() this function walks the tree of windows recursively. The walk 67 // FindWindowEx() this function walks the tree of windows recursively. The walk
68 // is done in breadth-first order. The function returns nullptr if the child 68 // is done in breadth-first order. The function returns nullptr if the child
69 // window could not be found. 69 // window could not be found.
70 HWND FindWindowRecursively(HWND parent, const base::string16& class_name) { 70 HWND FindWindowRecursively(HWND parent, const base::string16& class_name) {
71 std::list<HWND> windows; 71 std::list<HWND> windows;
72 windows.push_back(parent); 72 windows.push_back(parent);
73 73
74 while (!windows.empty()) { 74 while (!windows.empty()) {
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 } 609 }
610 610
611 // Close the window once all pending window messages are processed. 611 // Close the window once all pending window messages are processed.
612 HWND window = reinterpret_cast<HWND>(wparam); 612 HWND window = reinterpret_cast<HWND>(wparam);
613 LOG(WARNING) << "RDP: closing a window: " << std::hex << window; 613 LOG(WARNING) << "RDP: closing a window: " << std::hex << window;
614 ::PostMessage(window, WM_CLOSE, 0, 0); 614 ::PostMessage(window, WM_CLOSE, 0, 0);
615 return 0; 615 return 0;
616 } 616 }
617 617
618 } // namespace remoting 618 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/chromoting_module.cc ('k') | services/catalog/catalog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698