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

Side by Side Diff: base/win/metro.cc

Issue 141773009: Revert r151669 and r155589 as non-Aura Metro mode is gone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment from Nico Created 6 years, 10 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 | « base/win/metro.h ('k') | base/win/text_services_message_filter.h » ('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 "base/win/metro.h" 5 #include "base/win/metro.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/win/scoped_comptr.h" 9 #include "base/win/scoped_comptr.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 IsImmersiveProcessFunc is_immersive_process = 60 IsImmersiveProcessFunc is_immersive_process =
61 reinterpret_cast<IsImmersiveProcessFunc>( 61 reinterpret_cast<IsImmersiveProcessFunc>(
62 ::GetProcAddress(user32, "IsImmersiveProcess")); 62 ::GetProcAddress(user32, "IsImmersiveProcess"));
63 63
64 if (is_immersive_process) 64 if (is_immersive_process)
65 return is_immersive_process(process) ? true: false; 65 return is_immersive_process(process) ? true: false;
66 return false; 66 return false;
67 } 67 }
68 68
69 bool IsTSFAwareRequired() {
70 // Although this function is equal to IsMetroProcess at this moment,
71 // Chrome for Win7 and Vista may support TSF in the future.
72 return IsMetroProcess();
73 }
74
75 wchar_t* LocalAllocAndCopyString(const string16& src) { 69 wchar_t* LocalAllocAndCopyString(const string16& src) {
76 size_t dest_size = (src.length() + 1) * sizeof(wchar_t); 70 size_t dest_size = (src.length() + 1) * sizeof(wchar_t);
77 wchar_t* dest = reinterpret_cast<wchar_t*>(LocalAlloc(LPTR, dest_size)); 71 wchar_t* dest = reinterpret_cast<wchar_t*>(LocalAlloc(LPTR, dest_size));
78 base::wcslcpy(dest, src.c_str(), dest_size); 72 base::wcslcpy(dest, src.c_str(), dest_size);
79 return dest; 73 return dest;
80 } 74 }
81 75
82 bool IsParentalControlActivityLoggingOn() { 76 bool IsParentalControlActivityLoggingOn() {
83 // Query this info on Windows Vista and above. 77 // Query this info on Windows Vista and above.
84 if (base::win::GetVersion() < base::win::VERSION_VISTA) 78 if (base::win::GetVersion() < base::win::VERSION_VISTA)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 reinterpret_cast<GetInitialSearchString>( 136 reinterpret_cast<GetInitialSearchString>(
143 ::GetProcAddress(metro, "GetInitialSearchString")); 137 ::GetProcAddress(metro, "GetInitialSearchString"));
144 DCHECK(initial_search_string); 138 DCHECK(initial_search_string);
145 *params = initial_search_string(); 139 *params = initial_search_string();
146 } 140 }
147 return launch_type; 141 return launch_type;
148 } 142 }
149 143
150 } // namespace win 144 } // namespace win
151 } // namespace base 145 } // namespace base
OLDNEW
« no previous file with comments | « base/win/metro.h ('k') | base/win/text_services_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698