OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/browser/find_bar_controller.h" | 13 #include "chrome/browser/find_bar_controller.h" |
14 #include "chrome/browser/renderer_host/render_widget_host.h" | 14 #include "chrome/browser/renderer_host/render_widget_host.h" |
15 #include "chrome/common/content_settings_types.h" | 15 #include "chrome/common/content_settings_types.h" |
16 #include "chrome/common/page_zoom.h" | 16 #include "chrome/common/page_zoom.h" |
17 #include "chrome/common/translate_errors.h" | 17 #include "chrome/common/translate_errors.h" |
18 #include "chrome/common/view_types.h" | 18 #include "chrome/common/view_types.h" |
19 #include "chrome/common/window_container_type.h" | 19 #include "chrome/common/window_container_type.h" |
20 #include "net/base/load_states.h" | 20 #include "net/base/load_states.h" |
21 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 21 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
22 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" |
23 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" | 23 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" |
24 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 24 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
25 #include "webkit/glue/webaccessibility.h" | |
26 #include "webkit/glue/window_open_disposition.h" | 25 #include "webkit/glue/window_open_disposition.h" |
27 | 26 |
28 class FilePath; | 27 class FilePath; |
29 class GURL; | 28 class GURL; |
30 class ListValue; | 29 class ListValue; |
31 class RenderViewHostDelegate; | 30 class RenderViewHostDelegate; |
32 class SiteInstance; | 31 class SiteInstance; |
33 class SkBitmap; | 32 class SkBitmap; |
34 class ViewMsg_Navigate; | 33 class ViewMsg_Navigate; |
35 struct ContentSettings; | 34 struct ContentSettings; |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 void SendContentSettings(const GURL& url, | 468 void SendContentSettings(const GURL& url, |
470 const ContentSettings& settings); | 469 const ContentSettings& settings); |
471 | 470 |
472 // Tells the renderer to notify us when the page contents preferred size | 471 // Tells the renderer to notify us when the page contents preferred size |
473 // changed. |flags| is a combination of | 472 // changed. |flags| is a combination of |
474 // |ViewHostMsg_EnablePreferredSizeChangedMode_Flags| values, which is defined | 473 // |ViewHostMsg_EnablePreferredSizeChangedMode_Flags| values, which is defined |
475 // in render_messages.h. | 474 // in render_messages.h. |
476 void EnablePreferredSizeChangedMode(int flags); | 475 void EnablePreferredSizeChangedMode(int flags); |
477 | 476 |
478 #if defined(UNIT_TEST) | 477 #if defined(UNIT_TEST) |
479 // These functions shouldn't be necessary outside of testing. | 478 // This shouldn't be necessary outside of testing. |
480 | |
481 void set_save_accessibility_tree_for_testing(bool save) { | |
482 save_accessibility_tree_for_testing_ = save; | |
483 } | |
484 | |
485 const webkit_glue::WebAccessibility& accessibility_tree() { | |
486 return accessibility_tree_; | |
487 } | |
488 | |
489 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } | 479 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } |
490 #endif | 480 #endif |
491 | 481 |
492 protected: | 482 protected: |
493 // RenderWidgetHost protected overrides. | 483 // RenderWidgetHost protected overrides. |
494 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 484 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
495 bool* is_keyboard_shortcut); | 485 bool* is_keyboard_shortcut); |
496 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); | 486 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); |
497 virtual void OnUserGesture(); | 487 virtual void OnUserGesture(); |
498 virtual void NotifyRendererUnresponsive(); | 488 virtual void NotifyRendererUnresponsive(); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 bool is_extension_process_; | 737 bool is_extension_process_; |
748 | 738 |
749 // AutoFill and Autocomplete suggestions. We accumulate these separately and | 739 // AutoFill and Autocomplete suggestions. We accumulate these separately and |
750 // send them back to the renderer together. | 740 // send them back to the renderer together. |
751 int autofill_query_id_; | 741 int autofill_query_id_; |
752 std::vector<string16> autofill_values_; | 742 std::vector<string16> autofill_values_; |
753 std::vector<string16> autofill_labels_; | 743 std::vector<string16> autofill_labels_; |
754 std::vector<string16> autofill_icons_; | 744 std::vector<string16> autofill_icons_; |
755 std::vector<int> autofill_unique_ids_; | 745 std::vector<int> autofill_unique_ids_; |
756 | 746 |
757 // Whether the accessibility tree should be saved, for unit testing. | |
758 bool save_accessibility_tree_for_testing_; | |
759 | |
760 // The most recently received accessibility tree - for unit testing only. | |
761 webkit_glue::WebAccessibility accessibility_tree_; | |
762 | |
763 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 747 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
764 }; | 748 }; |
765 | 749 |
766 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 750 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |