| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 virtual void UpdateWebkitPreferences( | 224 virtual void UpdateWebkitPreferences( |
| 225 const webkit_glue::WebPreferences& prefs) OVERRIDE; | 225 const webkit_glue::WebPreferences& prefs) OVERRIDE; |
| 226 | 226 |
| 227 void set_delegate(RenderViewHostDelegate* d) { | 227 void set_delegate(RenderViewHostDelegate* d) { |
| 228 CHECK(d); // http://crbug.com/82827 | 228 CHECK(d); // http://crbug.com/82827 |
| 229 delegate_ = d; | 229 delegate_ = d; |
| 230 } | 230 } |
| 231 | 231 |
| 232 // Set up the RenderView child process. Virtual because it is overridden by | 232 // Set up the RenderView child process. Virtual because it is overridden by |
| 233 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used | 233 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used |
| 234 // as the name of the new top-level frame. The |opener_route_id| parameter | 234 // as the name of the new top-level frame. |
| 235 // indicates which RenderView created this (MSG_ROUTING_NONE if none). If | 235 // The |opener_route_id| parameter indicates which RenderView created this |
| 236 // |max_page_id| is larger than -1, the RenderView is told to start issuing | 236 // (MSG_ROUTING_NONE if none). If |max_page_id| is larger than -1, the |
| 237 // page IDs at |max_page_id| + 1. | 237 // RenderView is told to start issuing page IDs at |max_page_id| + 1. |
| 238 // If this RenderView is a guest, the embedder's process ID is also passed in |
| 239 // so that the RenderView's process can establish a channel with its embedder |
| 240 // if it's not already established. |
| 238 virtual bool CreateRenderView(const string16& frame_name, | 241 virtual bool CreateRenderView(const string16& frame_name, |
| 239 int opener_route_id, | 242 int opener_route_id, |
| 240 int32 max_page_id); | 243 int32 max_page_id, |
| 244 int embedder_process_id); |
| 241 | 245 |
| 242 base::TerminationStatus render_view_termination_status() const { | 246 base::TerminationStatus render_view_termination_status() const { |
| 243 return render_view_termination_status_; | 247 return render_view_termination_status_; |
| 244 } | 248 } |
| 245 | 249 |
| 246 // Sends the given navigation message. Use this rather than sending it | 250 // Sends the given navigation message. Use this rather than sending it |
| 247 // yourself since this does the internal bookkeeping described below. This | 251 // yourself since this does the internal bookkeeping described below. This |
| 248 // function takes ownership of the provided message pointer. | 252 // function takes ownership of the provided message pointer. |
| 249 // | 253 // |
| 250 // If a cross-site request is in progress, we may be suspended while waiting | 254 // If a cross-site request is in progress, we may be suspended while waiting |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 void LoadStateChanged(const GURL& url, | 348 void LoadStateChanged(const GURL& url, |
| 345 const net::LoadStateWithParam& load_state, | 349 const net::LoadStateWithParam& load_state, |
| 346 uint64 upload_position, | 350 uint64 upload_position, |
| 347 uint64 upload_size); | 351 uint64 upload_size); |
| 348 | 352 |
| 349 bool SuddenTerminationAllowed() const; | 353 bool SuddenTerminationAllowed() const; |
| 350 void set_sudden_termination_allowed(bool enabled) { | 354 void set_sudden_termination_allowed(bool enabled) { |
| 351 sudden_termination_allowed_ = enabled; | 355 sudden_termination_allowed_ = enabled; |
| 352 } | 356 } |
| 353 | 357 |
| 354 void set_guest(bool guest) { guest_ = guest; } | |
| 355 | |
| 356 // RenderWidgetHost public overrides. | 358 // RenderWidgetHost public overrides. |
| 357 virtual void Shutdown() OVERRIDE; | 359 virtual void Shutdown() OVERRIDE; |
| 358 virtual bool IsRenderView() const OVERRIDE; | 360 virtual bool IsRenderView() const OVERRIDE; |
| 359 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 361 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 360 virtual void GotFocus() OVERRIDE; | 362 virtual void GotFocus() OVERRIDE; |
| 361 virtual void LostCapture() OVERRIDE; | 363 virtual void LostCapture() OVERRIDE; |
| 362 virtual void LostMouseLock() OVERRIDE; | 364 virtual void LostMouseLock() OVERRIDE; |
| 363 virtual void ForwardMouseEvent( | 365 virtual void ForwardMouseEvent( |
| 364 const WebKit::WebMouseEvent& mouse_event) OVERRIDE; | 366 const WebKit::WebMouseEvent& mouse_event) OVERRIDE; |
| 365 virtual void OnMouseActivate() OVERRIDE; | 367 virtual void OnMouseActivate() OVERRIDE; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 scoped_refptr<SiteInstanceImpl> instance_; | 562 scoped_refptr<SiteInstanceImpl> instance_; |
| 561 | 563 |
| 562 // true if we are currently waiting for a response for drag context | 564 // true if we are currently waiting for a response for drag context |
| 563 // information. | 565 // information. |
| 564 bool waiting_for_drag_context_response_; | 566 bool waiting_for_drag_context_response_; |
| 565 | 567 |
| 566 // A bitwise OR of bindings types that have been enabled for this RenderView. | 568 // A bitwise OR of bindings types that have been enabled for this RenderView. |
| 567 // See BindingsPolicy for details. | 569 // See BindingsPolicy for details. |
| 568 int enabled_bindings_; | 570 int enabled_bindings_; |
| 569 | 571 |
| 570 // Indicates whether or not this RenderViewHost refers to a guest RenderView. | |
| 571 bool guest_; | |
| 572 | |
| 573 // The request_id for the pending cross-site request. Set to -1 if | 572 // The request_id for the pending cross-site request. Set to -1 if |
| 574 // there is a pending request, but we have not yet started the unload | 573 // there is a pending request, but we have not yet started the unload |
| 575 // for the current page. Set to the request_id value of the pending | 574 // for the current page. Set to the request_id value of the pending |
| 576 // request once we have gotten the some data for the pending page | 575 // request once we have gotten the some data for the pending page |
| 577 // and thus started the unload process. | 576 // and thus started the unload process. |
| 578 int pending_request_id_; | 577 int pending_request_id_; |
| 579 | 578 |
| 580 // Whether we should buffer outgoing Navigate messages rather than sending | 579 // Whether we should buffer outgoing Navigate messages rather than sending |
| 581 // them. This will be true when a RenderViewHost is created for a cross-site | 580 // them. This will be true when a RenderViewHost is created for a cross-site |
| 582 // request, until we hear back from the onbeforeunload handler of the old | 581 // request, until we hear back from the onbeforeunload handler of the old |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 650 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 652 }; | 651 }; |
| 653 | 652 |
| 654 #if defined(COMPILER_MSVC) | 653 #if defined(COMPILER_MSVC) |
| 655 #pragma warning(pop) | 654 #pragma warning(pop) |
| 656 #endif | 655 #endif |
| 657 | 656 |
| 658 } // namespace content | 657 } // namespace content |
| 659 | 658 |
| 660 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 659 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |