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

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

Issue 1380573003: Remove 2-stage RenderWidget initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix racy test Created 5 years, 2 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
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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 void UpdateWebkitPreferences(const WebPreferences& prefs) override; 178 void UpdateWebkitPreferences(const WebPreferences& prefs) override;
179 void OnWebkitPreferencesChanged() override; 179 void OnWebkitPreferencesChanged() override;
180 void SelectWordAroundCaret() override; 180 void SelectWordAroundCaret() override;
181 181
182 #if defined(OS_ANDROID) 182 #if defined(OS_ANDROID)
183 void ActivateNearestFindResult(int request_id, float x, float y) override; 183 void ActivateNearestFindResult(int request_id, float x, float y) override;
184 void RequestFindMatchRects(int current_version) override; 184 void RequestFindMatchRects(int current_version) override;
185 #endif 185 #endif
186 186
187 // RenderProcessHostObserver implementation 187 // RenderProcessHostObserver implementation
188 void RenderProcessReady(RenderProcessHost* host) override;
188 void RenderProcessExited(RenderProcessHost* host, 189 void RenderProcessExited(RenderProcessHost* host,
189 base::TerminationStatus status, 190 base::TerminationStatus status,
190 int exit_code) override; 191 int exit_code) override;
191 192
192 void set_delegate(RenderViewHostDelegate* d) { 193 void set_delegate(RenderViewHostDelegate* d) {
193 CHECK(d); // http://crbug.com/82827 194 CHECK(d); // http://crbug.com/82827
194 delegate_ = d; 195 delegate_ = d;
195 } 196 }
196 197
197 // Set up the RenderView child process. Virtual because it is overridden by 198 // Set up the RenderView child process. Virtual because it is overridden by
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 void OnFocus() override; 343 void OnFocus() override;
343 void OnBlur() override; 344 void OnBlur() override;
344 345
345 // IPC message handlers. 346 // IPC message handlers.
346 void OnShowView(int route_id, 347 void OnShowView(int route_id,
347 WindowOpenDisposition disposition, 348 WindowOpenDisposition disposition,
348 const gfx::Rect& initial_rect, 349 const gfx::Rect& initial_rect,
349 bool user_gesture); 350 bool user_gesture);
350 void OnShowWidget(int route_id, const gfx::Rect& initial_rect); 351 void OnShowWidget(int route_id, const gfx::Rect& initial_rect);
351 void OnShowFullscreenWidget(int route_id); 352 void OnShowFullscreenWidget(int route_id);
352 void OnRenderViewReady();
353 void OnRenderProcessGone(int status, int error_code); 353 void OnRenderProcessGone(int status, int error_code);
354 void OnUpdateState(int32 page_id, const PageState& state); 354 void OnUpdateState(int32 page_id, const PageState& state);
355 void OnUpdateTargetURL(const GURL& url); 355 void OnUpdateTargetURL(const GURL& url);
356 void OnClose(); 356 void OnClose();
357 void OnRequestMove(const gfx::Rect& pos); 357 void OnRequestMove(const gfx::Rect& pos);
358 void OnDocumentAvailableInMainFrame(bool uses_temporary_zoom_level); 358 void OnDocumentAvailableInMainFrame(bool uses_temporary_zoom_level);
359 void OnDidContentsPreferredSizeChange(const gfx::Size& new_size); 359 void OnDidContentsPreferredSizeChange(const gfx::Size& new_size);
360 void OnPasteFromSelectionClipboard(); 360 void OnPasteFromSelectionClipboard();
361 void OnRouteCloseEvent(); 361 void OnRouteCloseEvent();
362 void OnStartDragging(const DropData& drop_data, 362 void OnStartDragging(const DropData& drop_data,
(...skipping 14 matching lines...) Expand all
377 private: 377 private:
378 // TODO(nasko): Temporarily friend RenderFrameHostImpl, so we don't duplicate 378 // TODO(nasko): Temporarily friend RenderFrameHostImpl, so we don't duplicate
379 // utility functions and state needed in both classes, while we move frame 379 // utility functions and state needed in both classes, while we move frame
380 // specific code away from this class. 380 // specific code away from this class.
381 friend class RenderFrameHostImpl; 381 friend class RenderFrameHostImpl;
382 friend class TestRenderViewHost; 382 friend class TestRenderViewHost;
383 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost); 383 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost);
384 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane); 384 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane);
385 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest, 385 FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest,
386 CleanUpSwappedOutRVHOnProcessCrash); 386 CleanUpSwappedOutRVHOnProcessCrash);
387 // Send RenderViewReady to observers once the process is launched, but not
388 // re-entrantly.
389 void PostRenderViewReady();
390 void RenderViewReady();
387 391
388 // TODO(creis): Move to a private namespace on RenderFrameHostImpl. 392 // TODO(creis): Move to a private namespace on RenderFrameHostImpl.
389 // Delay to wait on closing the WebContents for a beforeunload/unload handler 393 // Delay to wait on closing the WebContents for a beforeunload/unload handler
390 // to fire. 394 // to fire.
391 static const int64 kUnloadTimeoutMS; 395 static const int64 kUnloadTimeoutMS;
392 396
393 // Returns the content specific prefs for this RenderViewHost. 397 // Returns the content specific prefs for this RenderViewHost.
394 // TODO(creis): Move most of this method to RenderProcessHost, since it's 398 // TODO(creis): Move most of this method to RenderProcessHost, since it's
395 // mostly the same across all RVHs in a process. Move the rest to RFH. 399 // mostly the same across all RVHs in a process. Move the rest to RFH.
396 // See https://crbug.com/304341. 400 // See https://crbug.com/304341.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // True if the current focused element is editable. 473 // True if the current focused element is editable.
470 bool is_focused_element_editable_; 474 bool is_focused_element_editable_;
471 475
472 // This is updated every time UpdateWebkitPreferences is called. That method 476 // This is updated every time UpdateWebkitPreferences is called. That method
473 // is in turn called when any of the settings change that the WebPreferences 477 // is in turn called when any of the settings change that the WebPreferences
474 // values depend on. 478 // values depend on.
475 scoped_ptr<WebPreferences> web_preferences_; 479 scoped_ptr<WebPreferences> web_preferences_;
476 480
477 bool updating_web_preferences_; 481 bool updating_web_preferences_;
478 482
483 bool render_view_ready_on_process_launch_;
484
479 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; 485 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_;
480 486
481 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); 487 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
482 }; 488 };
483 489
484 #if defined(COMPILER_MSVC) 490 #if defined(COMPILER_MSVC)
485 #pragma warning(pop) 491 #pragma warning(pop)
486 #endif 492 #endif
487 493
488 } // namespace content 494 } // namespace content
489 495
490 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 496 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('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