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

Side by Side Diff: ui/views/widget/root_view.cc

Issue 1536493002: Working proof of concept of select to speak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drag across multiple objects 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
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.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 "ui/views/widget/root_view.h" 5 #include "ui/views/widget/root_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 ui::EventDispatchDetails dispatch_details = 583 ui::EventDispatchDetails dispatch_details =
584 DispatchEvent(v, const_cast<ui::MouseWheelEvent*>(&event)); 584 DispatchEvent(v, const_cast<ui::MouseWheelEvent*>(&event));
585 if (dispatch_details.dispatcher_destroyed || 585 if (dispatch_details.dispatcher_destroyed ||
586 dispatch_details.target_destroyed) { 586 dispatch_details.target_destroyed) {
587 return event.handled(); 587 return event.handled();
588 } 588 }
589 } 589 }
590 return event.handled(); 590 return event.handled();
591 } 591 }
592 592
593 void RootView::OnAccessibilityMouseEvent(ui::MouseEvent* event) {
594 for (View* v = GetEventHandlerForPoint(event->location());
595 v && v != this && !event->handled(); v = v->parent()) {
596 ui::EventDispatchDetails dispatch_details =
597 DispatchEvent(v, const_cast<ui::MouseEvent*>(event));
598 if (dispatch_details.dispatcher_destroyed ||
599 dispatch_details.target_destroyed) {
600 return;
601 }
602 return;
603 }
604 }
605
593 void RootView::SetMouseHandler(View* new_mh) { 606 void RootView::SetMouseHandler(View* new_mh) {
594 // If we're clearing the mouse handler, clear explicit_mouse_handler_ as well. 607 // If we're clearing the mouse handler, clear explicit_mouse_handler_ as well.
595 explicit_mouse_handler_ = (new_mh != NULL); 608 explicit_mouse_handler_ = (new_mh != NULL);
596 mouse_pressed_handler_ = new_mh; 609 mouse_pressed_handler_ = new_mh;
597 gesture_handler_ = new_mh; 610 gesture_handler_ = new_mh;
598 drag_info_.Reset(); 611 drag_info_.Reset();
599 } 612 }
600 613
601 void RootView::GetAccessibleState(ui::AXViewState* state) { 614 void RootView::GetAccessibleState(ui::AXViewState* state) {
602 state->name = widget_->widget_delegate()->GetAccessibleWindowTitle(); 615 state->name = widget_->widget_delegate()->GetAccessibleWindowTitle();
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 768
756 #ifndef NDEBUG 769 #ifndef NDEBUG
757 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); 770 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_));
758 #endif 771 #endif
759 772
760 return details; 773 return details;
761 } 774 }
762 775
763 } // namespace internal 776 } // namespace internal
764 } // namespace views 777 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698