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