Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.h

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: New BrowserPluginSerializationRules. Removed unnecessary changes to VarTracker Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/process_util.h" 16 #include "base/process_util.h"
17 #include "content/browser/renderer_host/render_widget_host_impl.h" 17 #include "content/browser/renderer_host/render_widget_host_impl.h"
18 #include "content/browser/site_instance_impl.h" 18 #include "content/browser/site_instance_impl.h"
19 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/render_view_host.h" 20 #include "content/public/browser/render_view_host.h"
21 #include "content/public/common/window_container_type.h" 21 #include "content/public/common/window_container_type.h"
22 #include "net/base/load_states.h" 22 #include "net/base/load_states.h"
23 #include "ppapi/c/pp_instance.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
26 #include "ui/base/javascript_message_type.h" 27 #include "ui/base/javascript_message_type.h"
27 #include "webkit/glue/webaccessibility.h" 28 #include "webkit/glue/webaccessibility.h"
28 #include "webkit/glue/window_open_disposition.h" 29 #include "webkit/glue/window_open_disposition.h"
29 30
30 class ChildProcessSecurityPolicyImpl; 31 class ChildProcessSecurityPolicyImpl;
31 class PowerSaveBlocker; 32 class PowerSaveBlocker;
32 class SessionStorageNamespaceImpl; 33 class SessionStorageNamespaceImpl;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 virtual void UpdateWebkitPreferences( 224 virtual void UpdateWebkitPreferences(
224 const webkit_glue::WebPreferences& prefs) OVERRIDE; 225 const webkit_glue::WebPreferences& prefs) OVERRIDE;
225 226
226 void set_delegate(RenderViewHostDelegate* d) { 227 void set_delegate(RenderViewHostDelegate* d) {
227 CHECK(d); // http://crbug.com/82827 228 CHECK(d); // http://crbug.com/82827
228 delegate_ = d; 229 delegate_ = d;
229 } 230 }
230 231
231 // 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
232 // 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
233 // as the name of the new top-level frame. The |opener_route_id| parameter 234 // as the name of the new top-level frame. If |max_page_id| is larger than
235 // -1, the RenderView is told to start issuing page IDs at |max_page_id| + 1.
236 // If this RenderView is a guest, the embedder's process id is also passed in
237 // so that the RenderView's process can establish a channel with its embedder
238 // if it's not already established.
239 // The |opener_route_id| parameter
234 // indicates which RenderView created this (MSG_ROUTING_NONE if none). If 240 // indicates which RenderView created this (MSG_ROUTING_NONE if none). If
235 // |max_page_id| is larger than -1, the RenderView is told to start issuing 241 // |max_page_id| is larger than -1, the RenderView is told to start issuing
236 // page IDs at |max_page_id| + 1. 242 // page IDs at |max_page_id| + 1.
237 virtual bool CreateRenderView(const string16& frame_name, 243 virtual bool CreateRenderView(const string16& frame_name,
238 int opener_route_id, 244 int opener_route_id,
239 int32 max_page_id); 245 int32 max_page_id,
246 int embedder_process_id);
240 247
241 base::TerminationStatus render_view_termination_status() const { 248 base::TerminationStatus render_view_termination_status() const {
242 return render_view_termination_status_; 249 return render_view_termination_status_;
243 } 250 }
244 251
245 // Sends the given navigation message. Use this rather than sending it 252 // Sends the given navigation message. Use this rather than sending it
246 // yourself since this does the internal bookkeeping described below. This 253 // yourself since this does the internal bookkeeping described below. This
247 // function takes ownership of the provided message pointer. 254 // function takes ownership of the provided message pointer.
248 // 255 //
249 // If a cross-site request is in progress, we may be suspended while waiting 256 // 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
343 void LoadStateChanged(const GURL& url, 350 void LoadStateChanged(const GURL& url,
344 const net::LoadStateWithParam& load_state, 351 const net::LoadStateWithParam& load_state,
345 uint64 upload_position, 352 uint64 upload_position,
346 uint64 upload_size); 353 uint64 upload_size);
347 354
348 bool SuddenTerminationAllowed() const; 355 bool SuddenTerminationAllowed() const;
349 void set_sudden_termination_allowed(bool enabled) { 356 void set_sudden_termination_allowed(bool enabled) {
350 sudden_termination_allowed_ = enabled; 357 sudden_termination_allowed_ = enabled;
351 } 358 }
352 359
353 void set_guest(bool guest) { guest_ = guest; }
354
355 // RenderWidgetHost public overrides. 360 // RenderWidgetHost public overrides.
356 virtual void Shutdown() OVERRIDE; 361 virtual void Shutdown() OVERRIDE;
357 virtual bool IsRenderView() const OVERRIDE; 362 virtual bool IsRenderView() const OVERRIDE;
358 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 363 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
359 virtual void GotFocus() OVERRIDE; 364 virtual void GotFocus() OVERRIDE;
360 virtual void LostCapture() OVERRIDE; 365 virtual void LostCapture() OVERRIDE;
361 virtual void LostMouseLock() OVERRIDE; 366 virtual void LostMouseLock() OVERRIDE;
362 virtual void ForwardMouseEvent( 367 virtual void ForwardMouseEvent(
363 const WebKit::WebMouseEvent& mouse_event) OVERRIDE; 368 const WebKit::WebMouseEvent& mouse_event) OVERRIDE;
364 virtual void OnMouseActivate() OVERRIDE; 369 virtual void OnMouseActivate() OVERRIDE;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 scoped_refptr<SiteInstanceImpl> instance_; 558 scoped_refptr<SiteInstanceImpl> instance_;
554 559
555 // true if we are currently waiting for a response for drag context 560 // true if we are currently waiting for a response for drag context
556 // information. 561 // information.
557 bool waiting_for_drag_context_response_; 562 bool waiting_for_drag_context_response_;
558 563
559 // A bitwise OR of bindings types that have been enabled for this RenderView. 564 // A bitwise OR of bindings types that have been enabled for this RenderView.
560 // See BindingsPolicy for details. 565 // See BindingsPolicy for details.
561 int enabled_bindings_; 566 int enabled_bindings_;
562 567
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 568 // 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 569 // 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 570 // 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 571 // request once we have gotten the some data for the pending page
570 // and thus started the unload process. 572 // and thus started the unload process.
571 int pending_request_id_; 573 int pending_request_id_;
572 574
573 // Whether we should buffer outgoing Navigate messages rather than sending 575 // 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 576 // 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 577 // request, until we hear back from the onbeforeunload handler of the old
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); 646 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
645 }; 647 };
646 648
647 #if defined(COMPILER_MSVC) 649 #if defined(COMPILER_MSVC)
648 #pragma warning(pop) 650 #pragma warning(pop)
649 #endif 651 #endif
650 652
651 } // namespace content 653 } // namespace content
652 654
653 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 655 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/example.html ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698