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

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 1485023003: Misc truncation fixes for gn builds with VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes to four more components/content files Created 5 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
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 "content/browser/accessibility/browser_accessibility_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include <UIAutomationClient.h> 7 #include <UIAutomationClient.h>
8 #include <UIAutomationCoreApi.h> 8 #include <UIAutomationCoreApi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 BSTR* attrib_values, 2766 BSTR* attrib_values,
2767 unsigned short* num_attribs) { 2767 unsigned short* num_attribs) {
2768 if (!instance_active()) 2768 if (!instance_active())
2769 return E_FAIL; 2769 return E_FAIL;
2770 2770
2771 if (!attrib_names || !name_space_id || !attrib_values || !num_attribs) 2771 if (!attrib_names || !name_space_id || !attrib_values || !num_attribs)
2772 return E_INVALIDARG; 2772 return E_INVALIDARG;
2773 2773
2774 *num_attribs = max_attribs; 2774 *num_attribs = max_attribs;
2775 if (*num_attribs > GetHtmlAttributes().size()) 2775 if (*num_attribs > GetHtmlAttributes().size())
2776 *num_attribs = GetHtmlAttributes().size(); 2776 *num_attribs = static_cast<unsigned short>(GetHtmlAttributes().size());
2777 2777
2778 for (unsigned short i = 0; i < *num_attribs; ++i) { 2778 for (unsigned short i = 0; i < *num_attribs; ++i) {
2779 attrib_names[i] = SysAllocString( 2779 attrib_names[i] = SysAllocString(
2780 base::UTF8ToUTF16(GetHtmlAttributes()[i].first).c_str()); 2780 base::UTF8ToUTF16(GetHtmlAttributes()[i].first).c_str());
2781 name_space_id[i] = 0; 2781 name_space_id[i] = 0;
2782 attrib_values[i] = SysAllocString( 2782 attrib_values[i] = SysAllocString(
2783 base::UTF8ToUTF16(GetHtmlAttributes()[i].second).c_str()); 2783 base::UTF8ToUTF16(GetHtmlAttributes()[i].second).c_str());
2784 } 2784 }
2785 return S_OK; 2785 return S_OK;
2786 } 2786 }
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 ia2_role = ia_role; 4690 ia2_role = ia_role;
4691 4691
4692 win_attributes_->ia_role = ia_role; 4692 win_attributes_->ia_role = ia_role;
4693 win_attributes_->ia_state = ia_state; 4693 win_attributes_->ia_state = ia_state;
4694 win_attributes_->role_name = role_name; 4694 win_attributes_->role_name = role_name;
4695 win_attributes_->ia2_role = ia2_role; 4695 win_attributes_->ia2_role = ia2_role;
4696 win_attributes_->ia2_state = ia2_state; 4696 win_attributes_->ia2_state = ia2_state;
4697 } 4697 }
4698 4698
4699 } // namespace content 4699 } // namespace content
OLDNEW
« no previous file with comments | « components/history/core/browser/history_backend_unittest.cc ('k') | content/browser/indexed_db/indexed_db_leveldb_coding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698