OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 void set_ignore_input_events(bool ignore_input_events) { | 386 void set_ignore_input_events(bool ignore_input_events) { |
387 ignore_input_events_ = ignore_input_events; | 387 ignore_input_events_ = ignore_input_events; |
388 } | 388 } |
389 bool ignore_input_events() const { | 389 bool ignore_input_events() const { |
390 return ignore_input_events_; | 390 return ignore_input_events_; |
391 } | 391 } |
392 | 392 |
393 // Activate deferred plugin handles. | 393 // Activate deferred plugin handles. |
394 void ActivateDeferredPluginHandles(); | 394 void ActivateDeferredPluginHandles(); |
395 | 395 |
| 396 const gfx::Size& last_scroll_offset() const { return last_scroll_offset_; } |
| 397 |
396 protected: | 398 protected: |
397 // Internal implementation of the public Forward*Event() methods. | 399 // Internal implementation of the public Forward*Event() methods. |
398 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, | 400 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, |
399 int event_size, bool is_keyboard_shortcut); | 401 int event_size, bool is_keyboard_shortcut); |
400 | 402 |
401 // Called when we receive a notification indicating that the renderer | 403 // Called when we receive a notification indicating that the renderer |
402 // process has gone. This will reset our state so that our state will be | 404 // process has gone. This will reset our state so that our state will be |
403 // consistent if a new renderer is created. | 405 // consistent if a new renderer is created. |
404 void RendererExited(base::TerminationStatus status, int exit_code); | 406 void RendererExited(base::TerminationStatus status, int exit_code); |
405 | 407 |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 // handle the Char events and cause unexpected behavior. | 660 // handle the Char events and cause unexpected behavior. |
659 // For example, pressing alt-2 may let the browser switch to the second tab, | 661 // For example, pressing alt-2 may let the browser switch to the second tab, |
660 // but the Char event generated by alt-2 may also activate a HTML element | 662 // but the Char event generated by alt-2 may also activate a HTML element |
661 // if its accesskey happens to be "2", then the user may get confused when | 663 // if its accesskey happens to be "2", then the user may get confused when |
662 // switching back to the original tab, because the content may already be | 664 // switching back to the original tab, because the content may already be |
663 // changed. | 665 // changed. |
664 bool suppress_next_char_events_; | 666 bool suppress_next_char_events_; |
665 | 667 |
666 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; | 668 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; |
667 | 669 |
| 670 // The last scroll offset of the render widget. |
| 671 gfx::Size last_scroll_offset_; |
| 672 |
668 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 673 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
669 }; | 674 }; |
670 | 675 |
671 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 676 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
OLD | NEW |