| 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" |
| 25 #include "webkit/glue/window_open_disposition.h" | 26 #include "webkit/glue/window_open_disposition.h" |
| 26 | 27 |
| 27 class FilePath; | 28 class FilePath; |
| 28 class GURL; | 29 class GURL; |
| 29 class ListValue; | 30 class ListValue; |
| 30 class RenderViewHostDelegate; | 31 class RenderViewHostDelegate; |
| 31 class SiteInstance; | 32 class SiteInstance; |
| 32 class SkBitmap; | 33 class SkBitmap; |
| 33 class ViewMsg_Navigate; | 34 class ViewMsg_Navigate; |
| 34 struct ContentSettings; | 35 struct ContentSettings; |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 void SendContentSettings(const GURL& url, | 469 void SendContentSettings(const GURL& url, |
| 469 const ContentSettings& settings); | 470 const ContentSettings& settings); |
| 470 | 471 |
| 471 // Tells the renderer to notify us when the page contents preferred size | 472 // Tells the renderer to notify us when the page contents preferred size |
| 472 // changed. |flags| is a combination of | 473 // changed. |flags| is a combination of |
| 473 // |ViewHostMsg_EnablePreferredSizeChangedMode_Flags| values, which is defined | 474 // |ViewHostMsg_EnablePreferredSizeChangedMode_Flags| values, which is defined |
| 474 // in render_messages.h. | 475 // in render_messages.h. |
| 475 void EnablePreferredSizeChangedMode(int flags); | 476 void EnablePreferredSizeChangedMode(int flags); |
| 476 | 477 |
| 477 #if defined(UNIT_TEST) | 478 #if defined(UNIT_TEST) |
| 478 // This shouldn't be necessary outside of testing. | 479 // These functions 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 |
| 479 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } | 489 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } |
| 480 #endif | 490 #endif |
| 481 | 491 |
| 482 protected: | 492 protected: |
| 483 // RenderWidgetHost protected overrides. | 493 // RenderWidgetHost protected overrides. |
| 484 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 494 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 485 bool* is_keyboard_shortcut); | 495 bool* is_keyboard_shortcut); |
| 486 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); | 496 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 487 virtual void OnUserGesture(); | 497 virtual void OnUserGesture(); |
| 488 virtual void NotifyRendererUnresponsive(); | 498 virtual void NotifyRendererUnresponsive(); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 bool is_extension_process_; | 747 bool is_extension_process_; |
| 738 | 748 |
| 739 // AutoFill and Autocomplete suggestions. We accumulate these separately and | 749 // AutoFill and Autocomplete suggestions. We accumulate these separately and |
| 740 // send them back to the renderer together. | 750 // send them back to the renderer together. |
| 741 int autofill_query_id_; | 751 int autofill_query_id_; |
| 742 std::vector<string16> autofill_values_; | 752 std::vector<string16> autofill_values_; |
| 743 std::vector<string16> autofill_labels_; | 753 std::vector<string16> autofill_labels_; |
| 744 std::vector<string16> autofill_icons_; | 754 std::vector<string16> autofill_icons_; |
| 745 std::vector<int> autofill_unique_ids_; | 755 std::vector<int> autofill_unique_ids_; |
| 746 | 756 |
| 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 |
| 747 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 763 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
| 748 }; | 764 }; |
| 749 | 765 |
| 750 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 766 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |