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: content/browser/renderer_host/render_widget_host_impl.h

Issue 9939011: Add an accessibility mode for editable text fields only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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) 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const gfx::Size& accelerated_dest_size, 82 const gfx::Size& accelerated_dest_size,
83 skia::PlatformCanvas* output) OVERRIDE; 83 skia::PlatformCanvas* output) OVERRIDE;
84 #if defined(TOOLKIT_GTK) 84 #if defined(TOOLKIT_GTK)
85 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, 85 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect,
86 GdkWindow* target) OVERRIDE; 86 GdkWindow* target) OVERRIDE;
87 #elif defined(OS_MACOSX) 87 #elif defined(OS_MACOSX)
88 virtual gfx::Size GetBackingStoreSize() OVERRIDE; 88 virtual gfx::Size GetBackingStoreSize() OVERRIDE;
89 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, 89 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect,
90 CGContextRef target) OVERRIDE; 90 CGContextRef target) OVERRIDE;
91 #endif 91 #endif
92 virtual void EnableRendererAccessibility() OVERRIDE; 92 virtual void SetAccessibilityMode(AccessibilityMode mode) OVERRIDE;
93 virtual void ForwardMouseEvent( 93 virtual void ForwardMouseEvent(
94 const WebKit::WebMouseEvent& mouse_event) OVERRIDE; 94 const WebKit::WebMouseEvent& mouse_event) OVERRIDE;
95 virtual void ForwardWheelEvent( 95 virtual void ForwardWheelEvent(
96 const WebKit::WebMouseWheelEvent& wheel_event) OVERRIDE; 96 const WebKit::WebMouseWheelEvent& wheel_event) OVERRIDE;
97 virtual void ForwardKeyboardEvent( 97 virtual void ForwardKeyboardEvent(
98 const NativeWebKeyboardEvent& key_event) OVERRIDE; 98 const NativeWebKeyboardEvent& key_event) OVERRIDE;
99 virtual const gfx::Point& GetLastScrollOffset() const OVERRIDE; 99 virtual const gfx::Point& GetLastScrollOffset() const OVERRIDE;
100 virtual RenderProcessHost* GetProcess() const OVERRIDE; 100 virtual RenderProcessHost* GetProcess() const OVERRIDE;
101 virtual int GetRoutingID() const OVERRIDE; 101 virtual int GetRoutingID() const OVERRIDE;
102 virtual RenderWidgetHostView* GetView() const OVERRIDE; 102 virtual RenderWidgetHostView* GetView() const OVERRIDE;
103 virtual bool IsRenderView() const OVERRIDE; 103 virtual bool IsRenderView() const OVERRIDE;
104 virtual void PaintAtSize(TransportDIB::Handle dib_handle, 104 virtual void PaintAtSize(TransportDIB::Handle dib_handle,
105 int tag, 105 int tag,
106 const gfx::Size& page_size, 106 const gfx::Size& page_size,
107 const gfx::Size& desired_size) OVERRIDE; 107 const gfx::Size& desired_size) OVERRIDE;
108 virtual void Replace(const string16& word) OVERRIDE; 108 virtual void Replace(const string16& word) OVERRIDE;
109 virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE; 109 virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE;
110 virtual void RestartHangMonitorTimeout() OVERRIDE; 110 virtual void RestartHangMonitorTimeout() OVERRIDE;
111 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE; 111 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE;
112 virtual void Stop() OVERRIDE; 112 virtual void Stop() OVERRIDE;
113 virtual void WasResized() OVERRIDE; 113 virtual void WasResized() OVERRIDE;
114 virtual void AddKeyboardListener(KeyboardListener* listener) OVERRIDE; 114 virtual void AddKeyboardListener(KeyboardListener* listener) OVERRIDE;
115 virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE; 115 virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE;
116 116
117 // Sets the View of this RenderWidgetHost. 117 // Sets the View of this RenderWidgetHost.
118 void SetView(RenderWidgetHostView* view); 118 void SetView(RenderWidgetHostView* view);
119 119
120 int surface_id() const { return surface_id_; } 120 int surface_id() const { return surface_id_; }
121 bool renderer_accessible() { return renderer_accessible_; }
122 121
123 bool empty() const { return current_size_.IsEmpty(); } 122 bool empty() const { return current_size_.IsEmpty(); }
124 123
125 // Returns the property bag for this widget, where callers can add extra data 124 // Returns the property bag for this widget, where callers can add extra data
126 // they may wish to associate with it. Returns a pointer rather than a 125 // they may wish to associate with it. Returns a pointer rather than a
127 // reference since the PropertyAccessors expect this. 126 // reference since the PropertyAccessors expect this.
128 const base::PropertyBag* property_bag() const { return &property_bag_; } 127 const base::PropertyBag* property_bag() const { return &property_bag_; }
129 base::PropertyBag* property_bag() { return &property_bag_; } 128 base::PropertyBag* property_bag() { return &property_bag_; }
130 129
131 // Called when a renderer object already been created for this host, and we 130 // Called when a renderer object already been created for this host, and we
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 void DelayedAutoResized(); 537 void DelayedAutoResized();
539 538
540 // Created during construction but initialized during Init*(). Therefore, it 539 // Created during construction but initialized during Init*(). Therefore, it
541 // is guaranteed never to be NULL, but its channel may be NULL if the 540 // is guaranteed never to be NULL, but its channel may be NULL if the
542 // renderer crashed, so you must always check that. 541 // renderer crashed, so you must always check that.
543 RenderProcessHost* process_; 542 RenderProcessHost* process_;
544 543
545 // The ID of the corresponding object in the Renderer Instance. 544 // The ID of the corresponding object in the Renderer Instance.
546 int routing_id_; 545 int routing_id_;
547 546
548 // True if renderer accessibility is enabled. This should only be set when a
549 // screenreader is detected as it can potentially slow down Chrome.
550 bool renderer_accessible_;
551
552 // Stores random bits of data for others to associate with this object. 547 // Stores random bits of data for others to associate with this object.
553 base::PropertyBag property_bag_; 548 base::PropertyBag property_bag_;
554 549
555 // The ID of the surface corresponding to this render widget. 550 // The ID of the surface corresponding to this render widget.
556 int surface_id_; 551 int surface_id_;
557 552
558 // Indicates whether a page is loading or not. 553 // Indicates whether a page is loading or not.
559 bool is_loading_; 554 bool is_loading_;
560 555
561 // Indicates whether a page is hidden or not. 556 // Indicates whether a page is hidden or not.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 695 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
701 696
702 scoped_ptr<TapSuppressionController> tap_suppression_controller_; 697 scoped_ptr<TapSuppressionController> tap_suppression_controller_;
703 698
704 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 699 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
705 }; 700 };
706 701
707 } // namespace content 702 } // namespace content
708 703
709 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 704 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698