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/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/renderer_host/render_widget_host.h" | 14 #include "chrome/browser/renderer_host/render_widget_host.h" |
15 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 15 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
16 #include "chrome/common/content_settings_types.h" | 16 #include "chrome/common/content_settings_types.h" |
| 17 #include "chrome/common/extensions/extension.h" |
17 #include "chrome/common/page_zoom.h" | 18 #include "chrome/common/page_zoom.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 "net/base/load_states.h" | 22 #include "net/base/load_states.h" |
22 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 23 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
23 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" | 24 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" |
24 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" | 25 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" |
25 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 26 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
26 #include "webkit/glue/webaccessibility.h" | 27 #include "webkit/glue/webaccessibility.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // Returns a bitwise OR of bindings types that have been enabled for this | 352 // Returns a bitwise OR of bindings types that have been enabled for this |
352 // RenderView. See BindingsPolicy for details. | 353 // RenderView. See BindingsPolicy for details. |
353 int enabled_bindings() const { return enabled_bindings_; } | 354 int enabled_bindings() const { return enabled_bindings_; } |
354 | 355 |
355 // See variable comment. | 356 // See variable comment. |
356 bool is_extension_process() const { return is_extension_process_; } | 357 bool is_extension_process() const { return is_extension_process_; } |
357 void set_is_extension_process(bool is_extension_process) { | 358 void set_is_extension_process(bool is_extension_process) { |
358 is_extension_process_ = is_extension_process; | 359 is_extension_process_ = is_extension_process; |
359 } | 360 } |
360 | 361 |
| 362 // See variable comment. |
| 363 const Extension* installed_app() { return installed_app_; } |
| 364 void set_installed_app(const Extension* app) { |
| 365 installed_app_ = app; |
| 366 } |
| 367 |
361 // Sets a property with the given name and value on the DOM UI binding object. | 368 // Sets a property with the given name and value on the DOM UI binding object. |
362 // Must call AllowDOMUIBindings() on this renderer first. | 369 // Must call AllowDOMUIBindings() on this renderer first. |
363 void SetDOMUIProperty(const std::string& name, const std::string& value); | 370 void SetDOMUIProperty(const std::string& name, const std::string& value); |
364 | 371 |
365 // Tells the renderer view to focus the first (last if reverse is true) node. | 372 // Tells the renderer view to focus the first (last if reverse is true) node. |
366 void SetInitialFocus(bool reverse); | 373 void SetInitialFocus(bool reverse); |
367 | 374 |
368 // Clears the node that is currently focused (if any). | 375 // Clears the node that is currently focused (if any). |
369 void ClearFocusedNode(); | 376 void ClearFocusedNode(); |
370 | 377 |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 // True if the render view can be shut down suddenly. | 774 // True if the render view can be shut down suddenly. |
768 bool sudden_termination_allowed_; | 775 bool sudden_termination_allowed_; |
769 | 776 |
770 // The session storage namespace to be used by the associated render view. | 777 // The session storage namespace to be used by the associated render view. |
771 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; | 778 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
772 | 779 |
773 // Whether this render view will get extension api bindings. This controls | 780 // Whether this render view will get extension api bindings. This controls |
774 // what process type we use. | 781 // what process type we use. |
775 bool is_extension_process_; | 782 bool is_extension_process_; |
776 | 783 |
| 784 // The Extension object if this is a hosted or packaged app, NULL otherwise. |
| 785 // This can affect the request context used by the renderer. |
| 786 scoped_refptr<const Extension> installed_app_; |
| 787 |
777 // Whether the accessibility tree should be saved, for unit testing. | 788 // Whether the accessibility tree should be saved, for unit testing. |
778 bool save_accessibility_tree_for_testing_; | 789 bool save_accessibility_tree_for_testing_; |
779 | 790 |
780 // The most recently received accessibility tree - for unit testing only. | 791 // The most recently received accessibility tree - for unit testing only. |
781 webkit_glue::WebAccessibility accessibility_tree_; | 792 webkit_glue::WebAccessibility accessibility_tree_; |
782 | 793 |
783 // The termination status of the last render view that terminated. | 794 // The termination status of the last render view that terminated. |
784 base::TerminationStatus render_view_termination_status_; | 795 base::TerminationStatus render_view_termination_status_; |
785 | 796 |
786 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 797 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
787 }; | 798 }; |
788 | 799 |
789 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 800 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |