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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 145283003: Switch AccessibilityMode to be a bitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src@enable
Patch Set: Removed AccessibilityModeFlagRenderer, etc. Created 6 years, 10 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
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 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 // Set the RenderView background. 385 // Set the RenderView background.
386 void SetBackground(const SkBitmap& background); 386 void SetBackground(const SkBitmap& background);
387 387
388 // Notifies the renderer that the next key event is bound to one or more 388 // Notifies the renderer that the next key event is bound to one or more
389 // pre-defined edit commands 389 // pre-defined edit commands
390 void SetEditCommandsForNextKeyEvent( 390 void SetEditCommandsForNextKeyEvent(
391 const std::vector<EditCommand>& commands); 391 const std::vector<EditCommand>& commands);
392 392
393 // Gets the accessibility mode. 393 // Gets the accessibility mode.
394 AccessibilityMode accessibility_mode() const { 394 unsigned int accessibility_mode() const {
395 return accessibility_mode_; 395 return accessibility_mode_;
396 } 396 }
397 397
398 // Send a message to the renderer process to change the accessibility mode. 398 // Adds the given accessibility mode to the current accessibility mode bitmap.
399 void SetAccessibilityMode(AccessibilityMode mode); 399 void AddAccessibilityMode(AccessibilityMode mode);
400
401 // Removes the given accessibility mode from the current accessibility mode
402 // bitmap, managing the bits that are shared with other modes such that a
403 // bit will only be turned off when all modes that depend on it have been
404 // removed.
405 void RemoveAccessibilityMode(AccessibilityMode mode);
406
407 // Resets the accessibility mode to the default setting in
408 // BrowserStateAccessibilityImpl.
409 void ResetAccessibilityMode();
400 410
401 // Relay a request from assistive technology to perform the default action 411 // Relay a request from assistive technology to perform the default action
402 // on a given node. 412 // on a given node.
403 void AccessibilityDoDefaultAction(int object_id); 413 void AccessibilityDoDefaultAction(int object_id);
404 414
405 // Relay a request from assistive technology to set focus to a given node. 415 // Relay a request from assistive technology to set focus to a given node.
406 void AccessibilitySetFocus(int object_id); 416 void AccessibilitySetFocus(int object_id);
407 417
408 // Relay a request from assistive technology to make a given object 418 // Relay a request from assistive technology to make a given object
409 // visible by scrolling as many scrollable containers as necessary. 419 // visible by scrolling as many scrollable containers as necessary.
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, 760 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
751 InputEventAckState ack_result) OVERRIDE; 761 InputEventAckState ack_result) OVERRIDE;
752 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; 762 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE;
753 763
754 // Called when there is a new auto resize (using a post to avoid a stack 764 // Called when there is a new auto resize (using a post to avoid a stack
755 // which may get in recursive loops). 765 // which may get in recursive loops).
756 void DelayedAutoResized(); 766 void DelayedAutoResized();
757 767
758 void WindowSnapshotReachedScreen(int snapshot_id); 768 void WindowSnapshotReachedScreen(int snapshot_id);
759 769
770 // Send a message to the renderer process to change the accessibility mode.
771 void SetAccessibilityMode(unsigned int AccessibilityMode);
772
760 // Our delegate, which wants to know mainly about keyboard events. 773 // Our delegate, which wants to know mainly about keyboard events.
761 // It will remain non-NULL until DetachDelegate() is called. 774 // It will remain non-NULL until DetachDelegate() is called.
762 RenderWidgetHostDelegate* delegate_; 775 RenderWidgetHostDelegate* delegate_;
763 776
764 // Created during construction but initialized during Init*(). Therefore, it 777 // Created during construction but initialized during Init*(). Therefore, it
765 // is guaranteed never to be NULL, but its channel may be NULL if the 778 // is guaranteed never to be NULL, but its channel may be NULL if the
766 // renderer crashed, so you must always check that. 779 // renderer crashed, so you must always check that.
767 RenderProcessHost* process_; 780 RenderProcessHost* process_;
768 781
769 // The ID of the corresponding object in the Renderer Instance. 782 // The ID of the corresponding object in the Renderer Instance.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 gfx::Size new_auto_size_; 835 gfx::Size new_auto_size_;
823 836
824 // True if the render widget host should track the render widget's size as 837 // True if the render widget host should track the render widget's size as
825 // opposed to visa versa. 838 // opposed to visa versa.
826 bool should_auto_resize_; 839 bool should_auto_resize_;
827 840
828 bool waiting_for_screen_rects_ack_; 841 bool waiting_for_screen_rects_ack_;
829 gfx::Rect last_view_screen_rect_; 842 gfx::Rect last_view_screen_rect_;
830 gfx::Rect last_window_screen_rect_; 843 gfx::Rect last_window_screen_rect_;
831 844
832 AccessibilityMode accessibility_mode_; 845 unsigned int accessibility_mode_;
833 846
834 // Keyboard event listeners. 847 // Keyboard event listeners.
835 std::vector<KeyPressEventCallback> key_press_event_callbacks_; 848 std::vector<KeyPressEventCallback> key_press_event_callbacks_;
836 849
837 // Mouse event callbacks. 850 // Mouse event callbacks.
838 std::vector<MouseEventCallback> mouse_event_callbacks_; 851 std::vector<MouseEventCallback> mouse_event_callbacks_;
839 852
840 // If true, then we should repaint when restoring even if we have a 853 // If true, then we should repaint when restoring even if we have a
841 // backingstore. This flag is set to true if we receive a paint message 854 // backingstore. This flag is set to true if we receive a paint message
842 // while is_hidden_ to true. Even though we tell the render widget to hide 855 // while is_hidden_ to true. Even though we tell the render widget to hide
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_; 943 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
931 944
932 int64 last_input_number_; 945 int64 last_input_number_;
933 946
934 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 947 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
935 }; 948 };
936 949
937 } // namespace content 950 } // namespace content
938 951
939 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 952 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698