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