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