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

Side by Side Diff: win8/metro_driver/chrome_app_view_ash.cc

Issue 1216413002: Fix remaining warnings for -Wmissing-braces and enable on win clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Less nesting Created 5 years, 5 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 | « third_party/iaccessible2/BUILD.gn ('k') | no next file » | 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 "win8/metro_driver/stdafx.h" 5 #include "win8/metro_driver/stdafx.h"
6 #include "win8/metro_driver/chrome_app_view_ash.h" 6 #include "win8/metro_driver/chrome_app_view_ash.h"
7 7
8 #include <corewindow.h> 8 #include <corewindow.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <windows.foundation.h> 10 #include <windows.foundation.h>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ALT = 4 87 ALT = 4
88 }; 88 };
89 89
90 const int kChromeChannelPollTimerMs = 100; 90 const int kChromeChannelPollTimerMs = 100;
91 91
92 // Helper function to send keystrokes via the SendInput function. 92 // Helper function to send keystrokes via the SendInput function.
93 // mnemonic_char: The keystroke to be sent. 93 // mnemonic_char: The keystroke to be sent.
94 // modifiers: Combination with Alt, Ctrl, Shift, etc. 94 // modifiers: Combination with Alt, Ctrl, Shift, etc.
95 void SendKeySequence( 95 void SendKeySequence(
96 WORD mnemonic_char, KeyModifier modifiers) { 96 WORD mnemonic_char, KeyModifier modifiers) {
97 INPUT keys[4] = {0}; // Keyboard events 97 INPUT keys[4] = {}; // Keyboard events
98 int key_count = 0; // Number of generated events 98 int key_count = 0; // Number of generated events
99 99
100 if (modifiers & SHIFT) { 100 if (modifiers & SHIFT) {
101 keys[key_count].type = INPUT_KEYBOARD; 101 keys[key_count].type = INPUT_KEYBOARD;
102 keys[key_count].ki.wVk = VK_SHIFT; 102 keys[key_count].ki.wVk = VK_SHIFT;
103 keys[key_count].ki.wScan = MapVirtualKey(VK_SHIFT, 0); 103 keys[key_count].ki.wScan = MapVirtualKey(VK_SHIFT, 0);
104 key_count++; 104 key_count++;
105 } 105 }
106 106
107 if (modifiers & CONTROL) { 107 if (modifiers & CONTROL) {
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; 1460 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit;
1461 CheckHR(core_app.As(&app_exit)); 1461 CheckHR(core_app.As(&app_exit));
1462 globals.app_exit = app_exit.Detach(); 1462 globals.app_exit = app_exit.Detach();
1463 } 1463 }
1464 1464
1465 IFACEMETHODIMP 1465 IFACEMETHODIMP
1466 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { 1466 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) {
1467 *view = mswr::Make<ChromeAppViewAsh>().Detach(); 1467 *view = mswr::Make<ChromeAppViewAsh>().Detach();
1468 return (*view) ? S_OK : E_OUTOFMEMORY; 1468 return (*view) ? S_OK : E_OUTOFMEMORY;
1469 } 1469 }
OLDNEW
« no previous file with comments | « third_party/iaccessible2/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698