| Index: views/widget/widget_win.cc
|
| ===================================================================
|
| --- views/widget/widget_win.cc (revision 74564)
|
| +++ views/widget/widget_win.cc (working copy)
|
| @@ -19,6 +19,7 @@
|
| #include "ui/gfx/path.h"
|
| #include "views/accessibility/view_accessibility.h"
|
| #include "views/controls/native_control_win.h"
|
| +#include "views/focus/accelerator_handler.h"
|
| #include "views/focus/focus_util_win.h"
|
| #include "views/views_delegate.h"
|
| #include "views/widget/aero_tooltip_manager.h"
|
| @@ -53,8 +54,12 @@
|
| // Links the HWND to it's Widget (as a Widget, not a WidgetWin).
|
| static const char* const kWidgetKey = "__VIEWS_WIDGET__";
|
|
|
| +// static
|
| bool WidgetWin::screen_reader_active_ = false;
|
|
|
| +// static
|
| +std::vector<MSG>* WidgetWin::current_messages_ = NULL;
|
| +
|
| // A custom MSAA object id used to determine if a screen reader is actively
|
| // listening for MSAA events.
|
| #define OBJID_CUSTOM 1
|
| @@ -521,12 +526,15 @@
|
| // MessageLoop::Observer
|
|
|
| void WidgetWin::WillProcessMessage(const MSG& msg) {
|
| + if (!current_messages_)
|
| + current_messages_ = new std::vector<MSG>;
|
| + current_messages_->push_back(msg);
|
| }
|
|
|
| void WidgetWin::DidProcessMessage(const MSG& msg) {
|
| - if (root_view_->NeedsPainting(true)) {
|
| + if (root_view_->NeedsPainting(true))
|
| PaintNow(root_view_->GetScheduledPaintRect());
|
| - }
|
| + current_messages_->pop_back();
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -689,9 +697,7 @@
|
| }
|
|
|
| void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) {
|
| - KeyEvent event(ui::ET_KEY_PRESSED, ui::KeyboardCodeForWindowsKeyCode(c),
|
| - KeyEvent::GetKeyStateFlags(), rep_cnt, flags,
|
| - WM_KEYDOWN);
|
| + KeyEvent event(current_messages_->back());
|
| RootView* root_view = GetFocusedViewRootView();
|
| if (!root_view)
|
| root_view = root_view_.get();
|
| @@ -700,9 +706,7 @@
|
| }
|
|
|
| void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) {
|
| - KeyEvent event(ui::ET_KEY_RELEASED, ui::KeyboardCodeForWindowsKeyCode(c),
|
| - KeyEvent::GetKeyStateFlags(), rep_cnt, flags,
|
| - WM_KEYUP);
|
| + KeyEvent event(current_messages_->back());
|
| RootView* root_view = GetFocusedViewRootView();
|
| if (!root_view)
|
| root_view = root_view_.get();
|
|
|