| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 // Returns a bitwise OR of bindings types that have been enabled for this | 357 // Returns a bitwise OR of bindings types that have been enabled for this |
| 357 // RenderView. See BindingsPolicy for details. | 358 // RenderView. See BindingsPolicy for details. |
| 358 int enabled_bindings() const { return enabled_bindings_; } | 359 int enabled_bindings() const { return enabled_bindings_; } |
| 359 | 360 |
| 360 // See variable comment. | 361 // See variable comment. |
| 361 bool is_extension_process() const { return is_extension_process_; } | 362 bool is_extension_process() const { return is_extension_process_; } |
| 362 void set_is_extension_process(bool is_extension_process) { | 363 void set_is_extension_process(bool is_extension_process) { |
| 363 is_extension_process_ = is_extension_process; | 364 is_extension_process_ = is_extension_process; |
| 364 } | 365 } |
| 365 | 366 |
| 367 // See variable comment. |
| 368 const Extension* installed_app() { return installed_app_; } |
| 369 void set_installed_app(const Extension* app) { |
| 370 installed_app_ = app; |
| 371 } |
| 372 |
| 366 // Sets a property with the given name and value on the Web UI binding object. | 373 // Sets a property with the given name and value on the Web UI binding object. |
| 367 // Must call AllowWebUIBindings() on this renderer first. | 374 // Must call AllowWebUIBindings() on this renderer first. |
| 368 void SetWebUIProperty(const std::string& name, const std::string& value); | 375 void SetWebUIProperty(const std::string& name, const std::string& value); |
| 369 | 376 |
| 370 // Tells the renderer view to focus the first (last if reverse is true) node. | 377 // Tells the renderer view to focus the first (last if reverse is true) node. |
| 371 void SetInitialFocus(bool reverse); | 378 void SetInitialFocus(bool reverse); |
| 372 | 379 |
| 373 // Clears the node that is currently focused (if any). | 380 // Clears the node that is currently focused (if any). |
| 374 void ClearFocusedNode(); | 381 void ClearFocusedNode(); |
| 375 | 382 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 // True if the render view can be shut down suddenly. | 723 // True if the render view can be shut down suddenly. |
| 717 bool sudden_termination_allowed_; | 724 bool sudden_termination_allowed_; |
| 718 | 725 |
| 719 // The session storage namespace to be used by the associated render view. | 726 // The session storage namespace to be used by the associated render view. |
| 720 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 727 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
| 721 | 728 |
| 722 // Whether this render view will get extension api bindings. This controls | 729 // Whether this render view will get extension api bindings. This controls |
| 723 // what process type we use. | 730 // what process type we use. |
| 724 bool is_extension_process_; | 731 bool is_extension_process_; |
| 725 | 732 |
| 733 // The Extension object if this is a hosted or packaged app, NULL otherwise. |
| 734 // This can affect the request context used by the renderer. |
| 735 scoped_refptr<const Extension> installed_app_; |
| 736 |
| 726 // Whether the accessibility tree should be saved, for unit testing. | 737 // Whether the accessibility tree should be saved, for unit testing. |
| 727 bool save_accessibility_tree_for_testing_; | 738 bool save_accessibility_tree_for_testing_; |
| 728 | 739 |
| 729 // The most recently received accessibility tree - for unit testing only. | 740 // The most recently received accessibility tree - for unit testing only. |
| 730 webkit_glue::WebAccessibility accessibility_tree_; | 741 webkit_glue::WebAccessibility accessibility_tree_; |
| 731 | 742 |
| 732 // The termination status of the last render view that terminated. | 743 // The termination status of the last render view that terminated. |
| 733 base::TerminationStatus render_view_termination_status_; | 744 base::TerminationStatus render_view_termination_status_; |
| 734 | 745 |
| 735 // The enabled/disabled states of various commands. | 746 // The enabled/disabled states of various commands. |
| 736 std::map<RenderViewCommand, CommandState> command_states_; | 747 std::map<RenderViewCommand, CommandState> command_states_; |
| 737 | 748 |
| 738 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 749 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
| 739 }; | 750 }; |
| 740 | 751 |
| 741 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 752 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |