| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "app/gfx/native_widget_types.h" | 10 #include "app/gfx/native_widget_types.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 virtual void NotifyRendererResponsive() {} | 384 virtual void NotifyRendererResponsive() {} |
| 385 | 385 |
| 386 protected: | 386 protected: |
| 387 // true if a renderer has once been valid. We use this flag to display a sad | 387 // true if a renderer has once been valid. We use this flag to display a sad |
| 388 // tab only when we lose our renderer and not if a paint occurs during | 388 // tab only when we lose our renderer and not if a paint occurs during |
| 389 // initialization. | 389 // initialization. |
| 390 bool renderer_initialized_; | 390 bool renderer_initialized_; |
| 391 | 391 |
| 392 private: | 392 private: |
| 393 FRIEND_TEST(RenderWidgetHostTest, Resize); | 393 FRIEND_TEST(RenderWidgetHostTest, Resize); |
| 394 FRIEND_TEST(RenderWidgetHostTest, ResizeThenCrash); |
| 394 FRIEND_TEST(RenderWidgetHostTest, HiddenPaint); | 395 FRIEND_TEST(RenderWidgetHostTest, HiddenPaint); |
| 395 | 396 |
| 396 // Tell this object to destroy itself. | 397 // Tell this object to destroy itself. |
| 397 void Destroy(); | 398 void Destroy(); |
| 398 | 399 |
| 399 // Checks whether the renderer is hung and calls NotifyRendererUnresponsive | 400 // Checks whether the renderer is hung and calls NotifyRendererUnresponsive |
| 400 // if it is. | 401 // if it is. |
| 401 void CheckRendererIsUnresponsive(); | 402 void CheckRendererIsUnresponsive(); |
| 402 | 403 |
| 403 // Called if we know the renderer is responsive. When we currently thing the | 404 // Called if we know the renderer is responsive. When we currently thing the |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 // still want to access this object. To avoid this situation, |death_flag_| | 582 // still want to access this object. To avoid this situation, |death_flag_| |
| 582 // shall be pointed to a local variable in the method, and then |*death_flag_| | 583 // shall be pointed to a local variable in the method, and then |*death_flag_| |
| 583 // will be set to true when destroying this RenderWidgetHost object, then the | 584 // will be set to true when destroying this RenderWidgetHost object, then the |
| 584 // method shall exit immediately when |*death_flag_| becomes true. | 585 // method shall exit immediately when |*death_flag_| becomes true. |
| 585 bool* death_flag_; | 586 bool* death_flag_; |
| 586 | 587 |
| 587 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 588 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
| 588 }; | 589 }; |
| 589 | 590 |
| 590 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 591 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |