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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.h

Issue 2782003: Revert 49339 - Enable renderer accessibility by default.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string>
10 #include <vector>
11 9
12 #include "app/surface/transport_dib.h" 10 #include "app/surface/transport_dib.h"
13 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
14 #include "base/process.h" 12 #include "base/process.h"
15 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
16 #include "base/string16.h" 14 #include "base/string16.h"
17 #include "base/timer.h" 15 #include "base/timer.h"
18 #include "chrome/common/edit_command.h" 16 #include "chrome/common/edit_command.h"
19 #include "chrome/common/native_web_keyboard_event.h" 17 #include "chrome/common/native_web_keyboard_event.h"
20 #include "chrome/common/property_bag.h" 18 #include "chrome/common/property_bag.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // Makes an IPC call to tell webkit to replace the currently selected word 363 // Makes an IPC call to tell webkit to replace the currently selected word
366 // or a word around the cursor. 364 // or a word around the cursor.
367 void Replace(const string16& word); 365 void Replace(const string16& word);
368 366
369 // Makes an IPC call to tell webkit to advance to the next misspelling. 367 // Makes an IPC call to tell webkit to advance to the next misspelling.
370 void AdvanceToNextMisspelling(); 368 void AdvanceToNextMisspelling();
371 369
372 // Requests a snapshot of an accessible DOM tree from the renderer. 370 // Requests a snapshot of an accessible DOM tree from the renderer.
373 void RequestAccessibilityTree(); 371 void RequestAccessibilityTree();
374 372
375 // Aid for determining when an accessibility tree request can be made. Set by
376 // TabContents to true on document load and to false on page nativigation.
377 void SetDocumentLoaded(bool document_loaded);
378
379 // Enable renderer accessibility. This should only be called when a
380 // screenreader is detected.
381 void EnableRendererAccessibility();
382
383 // Relays a request from assistive technology to set focus to the 373 // Relays a request from assistive technology to set focus to the
384 // node with this accessibility object id. 374 // node with this accessibility object id.
385 void SetAccessibilityFocus(int acc_obj_id); 375 void SetAccessibilityFocus(int acc_obj_id);
386 376
387 // Relays a request from assistive technology to perform the default action 377 // Relays a request from assistive technology to perform the default action
388 // on a node with this accessibility object id. 378 // on a node with this accessibility object id.
389 void AccessibilityDoDefaultAction(int acc_obj_id); 379 void AccessibilityDoDefaultAction(int acc_obj_id);
390 380
391 // Sets the active state (i.e., control tints). 381 // Sets the active state (i.e., control tints).
392 virtual void SetActive(bool active); 382 virtual void SetActive(bool active);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 const gfx::Rect& bitmap_rect); 523 const gfx::Rect& bitmap_rect);
534 524
535 // Called by OnMsgInputEventAck() to process a keyboard event ack message. 525 // Called by OnMsgInputEventAck() to process a keyboard event ack message.
536 void ProcessKeyboardEventAck(int type, bool processed); 526 void ProcessKeyboardEventAck(int type, bool processed);
537 527
538 // Called by OnMsgInputEventAck() to process a wheel event ack message. 528 // Called by OnMsgInputEventAck() to process a wheel event ack message.
539 // This could result in a task being posted to allow additional wheel 529 // This could result in a task being posted to allow additional wheel
540 // input messages to be coalesced. 530 // input messages to be coalesced.
541 void ProcessWheelAck(); 531 void ProcessWheelAck();
542 532
543 // True if renderer accessibility is enabled. This should only be set when a
544 // screenreader is detected as it can potentially slow down Chrome.
545 static bool renderer_accessible_;
546
547 // The View associated with the RenderViewHost. The lifetime of this object 533 // The View associated with the RenderViewHost. The lifetime of this object
548 // is associated with the lifetime of the Render process. If the Renderer 534 // is associated with the lifetime of the Render process. If the Renderer
549 // crashes, its View is destroyed and this pointer becomes NULL, even though 535 // crashes, its View is destroyed and this pointer becomes NULL, even though
550 // render_view_host_ lives on to load another URL (creating a new View while 536 // render_view_host_ lives on to load another URL (creating a new View while
551 // doing so). 537 // doing so).
552 RenderWidgetHostView* view_; 538 RenderWidgetHostView* view_;
553 539
554 // Created during construction but initialized during Init*(). Therefore, it 540 // Created during construction but initialized during Init*(). Therefore, it
555 // is guaranteed never to be NULL, but its channel may be NULL if the 541 // is guaranteed never to be NULL, but its channel may be NULL if the
556 // renderer crashed, so you must always check that. 542 // renderer crashed, so you must always check that.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 // shall not send the following sequence of Char events, which was generated 660 // shall not send the following sequence of Char events, which was generated
675 // by this RawKeyDown event, to the renderer. Otherwise the renderer may 661 // by this RawKeyDown event, to the renderer. Otherwise the renderer may
676 // handle the Char events and cause unexpected behavior. 662 // handle the Char events and cause unexpected behavior.
677 // For example, pressing alt-2 may let the browser switch to the second tab, 663 // For example, pressing alt-2 may let the browser switch to the second tab,
678 // but the Char event generated by alt-2 may also activate a HTML element 664 // but the Char event generated by alt-2 may also activate a HTML element
679 // if its accesskey happens to be "2", then the user may get confused when 665 // if its accesskey happens to be "2", then the user may get confused when
680 // switching back to the original tab, because the content may already be 666 // switching back to the original tab, because the content may already be
681 // changed. 667 // changed.
682 bool suppress_next_char_events_; 668 bool suppress_next_char_events_;
683 669
684 // Keep track of if we have a loaded document so that we can request an
685 // accessibility tree on demand when renderer accessibility is enabled.
686 bool document_loaded_;
687
688 // Keep track of if we've already requested the accessibility tree so
689 // we don't do it more than once.
690 bool requested_accessibility_tree_;
691
692 // Optional video YUV layer for used for out-of-process compositing. 670 // Optional video YUV layer for used for out-of-process compositing.
693 scoped_ptr<VideoLayer> video_layer_; 671 scoped_ptr<VideoLayer> video_layer_;
694 672
695 // Set to true if we want to wait until at least one more time through 673 // Set to true if we want to wait until at least one more time through
696 // the event loop to see if any additional wheel messages are coming in 674 // the event loop to see if any additional wheel messages are coming in
697 // before sending the coalesced ones. 675 // before sending the coalesced ones.
698 bool spin_runloop_before_sending_wheel_event_; 676 bool spin_runloop_before_sending_wheel_event_;
699 677
700 // The time the last wheel message was sent to the renderer. 678 // The time the last wheel message was sent to the renderer.
701 base::TimeTicks last_wheel_message_time_; 679 base::TimeTicks last_wheel_message_time_;
702 680
703 // For running tasks. 681 // For running tasks.
704 ScopedRunnableMethodFactory<RenderWidgetHost> method_runner_; 682 ScopedRunnableMethodFactory<RenderWidgetHost> method_runner_;
705 683
706 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); 684 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost);
707 }; 685 };
708 686
709 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 687 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/accessibility_win_browsertest.cc ('k') | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698