| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_VIEW_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_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/process_util.h" | 12 #include "base/process_util.h" |
| 13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 14 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 15 #include "chrome/common/content_settings_types.h" | 15 #include "chrome/common/content_settings_types.h" |
| 16 #include "chrome/common/extensions/extension.h" |
| 16 #include "chrome/common/page_zoom.h" | 17 #include "chrome/common/page_zoom.h" |
| 17 #include "chrome/common/render_view_commands.h" | 18 #include "chrome/common/render_view_commands.h" |
| 18 #include "chrome/common/translate_errors.h" | 19 #include "chrome/common/translate_errors.h" |
| 19 #include "chrome/common/view_types.h" | 20 #include "chrome/common/view_types.h" |
| 20 #include "chrome/common/window_container_type.h" | 21 #include "chrome/common/window_container_type.h" |
| 21 #include "content/browser/renderer_host/render_widget_host.h" | 22 #include "content/browser/renderer_host/render_widget_host.h" |
| 22 #include "net/base/load_states.h" | 23 #include "net/base/load_states.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 // Returns a bitwise OR of bindings types that have been enabled for this | 359 // Returns a bitwise OR of bindings types that have been enabled for this |
| 359 // RenderView. See BindingsPolicy for details. | 360 // RenderView. See BindingsPolicy for details. |
| 360 int enabled_bindings() const { return enabled_bindings_; } | 361 int enabled_bindings() const { return enabled_bindings_; } |
| 361 | 362 |
| 362 // See variable comment. | 363 // See variable comment. |
| 363 bool is_extension_process() const { return is_extension_process_; } | 364 bool is_extension_process() const { return is_extension_process_; } |
| 364 void set_is_extension_process(bool is_extension_process) { | 365 void set_is_extension_process(bool is_extension_process) { |
| 365 is_extension_process_ = is_extension_process; | 366 is_extension_process_ = is_extension_process; |
| 366 } | 367 } |
| 367 | 368 |
| 369 // See variable comment. |
| 370 const Extension* installed_app() { return installed_app_; } |
| 371 void set_installed_app(const Extension* installed_app) { |
| 372 installed_app_ = installed_app; |
| 373 } |
| 374 |
| 368 // Sets a property with the given name and value on the Web UI binding object. | 375 // Sets a property with the given name and value on the Web UI binding object. |
| 369 // Must call AllowWebUIBindings() on this renderer first. | 376 // Must call AllowWebUIBindings() on this renderer first. |
| 370 void SetWebUIProperty(const std::string& name, const std::string& value); | 377 void SetWebUIProperty(const std::string& name, const std::string& value); |
| 371 | 378 |
| 372 // Tells the renderer view to focus the first (last if reverse is true) node. | 379 // Tells the renderer view to focus the first (last if reverse is true) node. |
| 373 void SetInitialFocus(bool reverse); | 380 void SetInitialFocus(bool reverse); |
| 374 | 381 |
| 375 // Clears the node that is currently focused (if any). | 382 // Clears the node that is currently focused (if any). |
| 376 void ClearFocusedNode(); | 383 void ClearFocusedNode(); |
| 377 | 384 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 // True if the render view can be shut down suddenly. | 725 // True if the render view can be shut down suddenly. |
| 719 bool sudden_termination_allowed_; | 726 bool sudden_termination_allowed_; |
| 720 | 727 |
| 721 // The session storage namespace to be used by the associated render view. | 728 // The session storage namespace to be used by the associated render view. |
| 722 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 729 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
| 723 | 730 |
| 724 // Whether this render view will get extension api bindings. This controls | 731 // Whether this render view will get extension api bindings. This controls |
| 725 // what process type we use. | 732 // what process type we use. |
| 726 bool is_extension_process_; | 733 bool is_extension_process_; |
| 727 | 734 |
| 735 // The Extension object if this is a hosted or packaged app, NULL otherwise. |
| 736 // This can affect the request context used by the renderer. |
| 737 scoped_refptr<const Extension> installed_app_; |
| 738 |
| 728 // Whether the accessibility tree should be saved, for unit testing. | 739 // Whether the accessibility tree should be saved, for unit testing. |
| 729 bool save_accessibility_tree_for_testing_; | 740 bool save_accessibility_tree_for_testing_; |
| 730 | 741 |
| 731 // The most recently received accessibility tree - for unit testing only. | 742 // The most recently received accessibility tree - for unit testing only. |
| 732 webkit_glue::WebAccessibility accessibility_tree_; | 743 webkit_glue::WebAccessibility accessibility_tree_; |
| 733 | 744 |
| 734 // The termination status of the last render view that terminated. | 745 // The termination status of the last render view that terminated. |
| 735 base::TerminationStatus render_view_termination_status_; | 746 base::TerminationStatus render_view_termination_status_; |
| 736 | 747 |
| 737 // The enabled/disabled states of various commands. | 748 // The enabled/disabled states of various commands. |
| 738 std::map<RenderViewCommand, CommandState> command_states_; | 749 std::map<RenderViewCommand, CommandState> command_states_; |
| 739 | 750 |
| 740 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 751 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
| 741 }; | 752 }; |
| 742 | 753 |
| 743 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 754 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |