| 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> |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // for the onbeforeunload handler, so this function might buffer the message | 144 // for the onbeforeunload handler, so this function might buffer the message |
| 145 // rather than sending it. | 145 // rather than sending it. |
| 146 void Navigate(const ViewMsg_Navigate_Params& message); | 146 void Navigate(const ViewMsg_Navigate_Params& message); |
| 147 | 147 |
| 148 // Load the specified URL, this is a shortcut for Navigate(). | 148 // Load the specified URL, this is a shortcut for Navigate(). |
| 149 void NavigateToURL(const GURL& url); | 149 void NavigateToURL(const GURL& url); |
| 150 | 150 |
| 151 // Returns whether navigation messages are currently suspended for this | 151 // Returns whether navigation messages are currently suspended for this |
| 152 // RenderViewHost. Only true during a cross-site navigation, while waiting | 152 // RenderViewHost. Only true during a cross-site navigation, while waiting |
| 153 // for the onbeforeunload handler. | 153 // for the onbeforeunload handler. |
| 154 bool are_navigations_suspended() { return navigations_suspended_; } | 154 bool are_navigations_suspended() const { return navigations_suspended_; } |
| 155 | 155 |
| 156 // Suspends (or unsuspends) any navigation messages from being sent from this | 156 // Suspends (or unsuspends) any navigation messages from being sent from this |
| 157 // RenderViewHost. This is called when a pending RenderViewHost is created | 157 // RenderViewHost. This is called when a pending RenderViewHost is created |
| 158 // for a cross-site navigation, because we must suspend any navigations until | 158 // for a cross-site navigation, because we must suspend any navigations until |
| 159 // we hear back from the old renderer's onbeforeunload handler. Note that it | 159 // we hear back from the old renderer's onbeforeunload handler. Note that it |
| 160 // is important that only one navigation event happen after calling this | 160 // is important that only one navigation event happen after calling this |
| 161 // method with |suspend| equal to true. If |suspend| is false and there is | 161 // method with |suspend| equal to true. If |suspend| is false and there is |
| 162 // a suspended_nav_message_, this will send the message. This function | 162 // a suspended_nav_message_, this will send the message. This function |
| 163 // should only be called to toggle the state; callers should check | 163 // should only be called to toggle the state; callers should check |
| 164 // are_navigations_suspended() first. | 164 // are_navigations_suspended() first. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 // Notifies the renderer that we're done with the drag and drop operation. | 341 // Notifies the renderer that we're done with the drag and drop operation. |
| 342 // This allows the renderer to reset some state. | 342 // This allows the renderer to reset some state. |
| 343 void DragSourceSystemDragEnded(); | 343 void DragSourceSystemDragEnded(); |
| 344 | 344 |
| 345 // Tell the render view to enable a set of javascript bindings. The argument | 345 // Tell the render view to enable a set of javascript bindings. The argument |
| 346 // should be a combination of values from BindingsPolicy. | 346 // should be a combination of values from BindingsPolicy. |
| 347 void AllowBindings(int binding_flags); | 347 void AllowBindings(int binding_flags); |
| 348 | 348 |
| 349 // Returns a bitwise OR of bindings types that have been enabled for this | 349 // Returns a bitwise OR of bindings types that have been enabled for this |
| 350 // RenderView. See BindingsPolicy for details. | 350 // RenderView. See BindingsPolicy for details. |
| 351 int enabled_bindings() { return enabled_bindings_; } | 351 int enabled_bindings() const { return enabled_bindings_; } |
| 352 | 352 |
| 353 // See variable comment. | 353 // See variable comment. |
| 354 bool is_extension_process() { return is_extension_process_; } | 354 bool is_extension_process() const { return is_extension_process_; } |
| 355 void set_is_extension_process(bool is_extension_process) { | 355 void set_is_extension_process(bool is_extension_process) { |
| 356 is_extension_process_ = is_extension_process; | 356 is_extension_process_ = is_extension_process; |
| 357 } | 357 } |
| 358 | 358 |
| 359 // Sets a property with the given name and value on the DOM UI binding object. | 359 // Sets a property with the given name and value on the DOM UI binding object. |
| 360 // Must call AllowDOMUIBindings() on this renderer first. | 360 // Must call AllowDOMUIBindings() on this renderer first. |
| 361 void SetDOMUIProperty(const std::string& name, const std::string& value); | 361 void SetDOMUIProperty(const std::string& name, const std::string& value); |
| 362 | 362 |
| 363 // Tells the renderer view to focus the first (last if reverse is true) node. | 363 // Tells the renderer view to focus the first (last if reverse is true) node. |
| 364 void SetInitialFocus(bool reverse); | 364 void SetInitialFocus(bool reverse); |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 // The most recently received accessibility tree - for unit testing only. | 828 // The most recently received accessibility tree - for unit testing only. |
| 829 webkit_glue::WebAccessibility accessibility_tree_; | 829 webkit_glue::WebAccessibility accessibility_tree_; |
| 830 | 830 |
| 831 // The termination status of the last render view that terminated. | 831 // The termination status of the last render view that terminated. |
| 832 base::TerminationStatus render_view_termination_status_; | 832 base::TerminationStatus render_view_termination_status_; |
| 833 | 833 |
| 834 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 834 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
| 835 }; | 835 }; |
| 836 | 836 |
| 837 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 837 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |