Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/base/accessibility/accessible_text_utils.h" | 5 #include "ui/base/accessibility/accessible_text_utils.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 } | 80 } |
| 81 | 81 |
| 82 if (direction == FORWARDS_DIRECTION) { | 82 if (direction == FORWARDS_DIRECTION) { |
| 83 result++; | 83 result++; |
| 84 } else { | 84 } else { |
| 85 result--; | 85 result--; |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 #if defined(OS_WIN) | |
| 91 // UIA TextProvider implementation. | |
| 92 UIATextProvider::UIATextProvider() | |
| 93 : editable_(false) {} | |
| 94 | |
| 95 // static | |
| 96 bool UIATextProvider::CreateTextProvider(bool editable, IUnknown** provider) { | |
| 97 CComObject<ui::UIATextProvider>* text_provider = NULL; | |
| 98 CComObject<ui::UIATextProvider>::CreateInstance(&text_provider); | |
| 99 DCHECK(text_provider); | |
| 100 text_provider->set_editable(true); | |
|
dmazzoni
2012/04/04 06:02:00
set_editable(editable)
ananta
2012/04/04 19:23:00
Done.
| |
| 101 text_provider->AddRef(); | |
| 102 HRESULT hr = text_provider->QueryInterface( | |
|
dmazzoni
2012/04/04 06:02:00
Is this necessary? I think you should be able to j
ananta
2012/04/04 19:23:00
That returns the following error.
error C2594: '='
dmazzoni
2012/04/04 19:30:15
This is because of the multiple inheritance. You s
ananta
2012/04/04 21:40:17
Done.
| |
| 103 IID_IUnknown, reinterpret_cast<void**>(provider)); | |
| 104 text_provider->Release(); | |
| 105 return hr == S_OK; | |
| 106 } | |
| 107 | |
| 108 STDMETHODIMP UIATextProvider::get_IsReadOnly(BOOL* read_only) { | |
| 109 *read_only = !editable_; | |
| 110 return S_OK; | |
| 111 } | |
| 112 #endif // OS_WIN | |
| 90 } // Namespace ui | 113 } // Namespace ui |
| OLD | NEW |