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

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

Issue 857213003: Refactor sudden termination (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits Created 5 years, 10 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 const std::vector<GURL>& links, 243 const std::vector<GURL>& links,
244 const std::vector<base::FilePath>& local_paths, 244 const std::vector<base::FilePath>& local_paths,
245 const base::FilePath& local_directory_name); 245 const base::FilePath& local_directory_name);
246 246
247 // Notifies the RenderViewHost that its load state changed. 247 // Notifies the RenderViewHost that its load state changed.
248 void LoadStateChanged(const GURL& url, 248 void LoadStateChanged(const GURL& url,
249 const net::LoadStateWithParam& load_state, 249 const net::LoadStateWithParam& load_state,
250 uint64 upload_position, 250 uint64 upload_position,
251 uint64 upload_size); 251 uint64 upload_size);
252 252
253 bool SuddenTerminationAllowed() const;
254 void set_sudden_termination_allowed(bool enabled) {
255 sudden_termination_allowed_ = enabled;
256 }
257
258 // RenderWidgetHost public overrides. 253 // RenderWidgetHost public overrides.
259 void Init() override; 254 void Init() override;
260 void Shutdown() override; 255 void Shutdown() override;
261 void WasHidden() override; 256 void WasHidden() override;
262 void WasShown(const ui::LatencyInfo& latency_info) override; 257 void WasShown(const ui::LatencyInfo& latency_info) override;
263 bool IsRenderView() const override; 258 bool IsRenderView() const override;
264 bool OnMessageReceived(const IPC::Message& msg) override; 259 bool OnMessageReceived(const IPC::Message& msg) override;
265 void GotFocus() override; 260 void GotFocus() override;
266 void LostCapture() override; 261 void LostCapture() override;
267 void LostMouseLock() override; 262 void LostMouseLock() override;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // must return to the renderer to unblock it. 424 // must return to the renderer to unblock it.
430 IPC::Message* run_modal_reply_msg_; 425 IPC::Message* run_modal_reply_msg_;
431 // This will hold the routing id of the RenderView that opened us. 426 // This will hold the routing id of the RenderView that opened us.
432 int run_modal_opener_id_; 427 int run_modal_opener_id_;
433 428
434 // Set to true when waiting for a ViewHostMsg_ClosePageACK. 429 // Set to true when waiting for a ViewHostMsg_ClosePageACK.
435 // TODO(creis): Move to RenderFrameHost and RenderWidgetHost. 430 // TODO(creis): Move to RenderFrameHost and RenderWidgetHost.
436 // See http://crbug.com/418265. 431 // See http://crbug.com/418265.
437 bool is_waiting_for_close_ack_; 432 bool is_waiting_for_close_ack_;
438 433
439 // True if the render view can be shut down suddenly.
440 bool sudden_termination_allowed_;
441
442 // The termination status of the last render view that terminated. 434 // The termination status of the last render view that terminated.
443 base::TerminationStatus render_view_termination_status_; 435 base::TerminationStatus render_view_termination_status_;
444 436
445 // Set to true if we requested the on screen keyboard to be displayed. 437 // Set to true if we requested the on screen keyboard to be displayed.
446 bool virtual_keyboard_requested_; 438 bool virtual_keyboard_requested_;
447 439
448 // True if the current focused element is editable. 440 // True if the current focused element is editable.
449 bool is_focused_element_editable_; 441 bool is_focused_element_editable_;
450 442
451 // This is updated every time UpdateWebkitPreferences is called. That method 443 // This is updated every time UpdateWebkitPreferences is called. That method
452 // is in turn called when any of the settings change that the WebPreferences 444 // is in turn called when any of the settings change that the WebPreferences
453 // values depend on. 445 // values depend on.
454 scoped_ptr<WebPreferences> web_preferences_; 446 scoped_ptr<WebPreferences> web_preferences_;
455 447
456 bool updating_web_preferences_; 448 bool updating_web_preferences_;
457 449
458 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_; 450 base::WeakPtrFactory<RenderViewHostImpl> weak_factory_;
459 451
460 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); 452 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
461 }; 453 };
462 454
463 #if defined(COMPILER_MSVC) 455 #if defined(COMPILER_MSVC)
464 #pragma warning(pop) 456 #pragma warning(pop)
465 #endif 457 #endif
466 458
467 } // namespace content 459 } // namespace content
468 460
469 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 461 #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