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

Unified Diff: chrome/renderer/render_view.h

Issue 16482: Refactor the render widget unittest so it can be reused to create a render vi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.h
===================================================================
--- chrome/renderer/render_view.h (revision 7533)
+++ chrome/renderer/render_view.h (working copy)
@@ -25,6 +25,7 @@
#include "chrome/renderer/external_js_object.h"
#include "chrome/renderer/render_process.h"
#include "chrome/renderer/render_widget.h"
+#include "testing/gtest/include/gtest/gtest_prod.h"
#include "webkit/glue/console_message_level.h"
#include "webkit/glue/dom_serializer_delegate.h"
#include "webkit/glue/glue_accessibility.h"
@@ -38,6 +39,7 @@
class DebugMessageHandler;
class GURL;
+class RenderThread;
class SkBitmap;
struct ThumbnailScore;
class WebError;
@@ -68,7 +70,8 @@
// RenderView is an object that manages a WebView object, and provides a
// communication interface with an embedding application process
//
-class RenderView : public RenderWidget, public WebViewDelegate,
+class RenderView : public RenderWidget,
+ public WebViewDelegate,
public webkit_glue::DomSerializerDelegate {
public:
// Creates a new RenderView. The parent_hwnd specifies a HWND to use as the
@@ -80,6 +83,7 @@
// parent_hwnd). |counter| is either a currently initialized counter, or NULL
// (in which case we treat this RenderView as a top level window).
static RenderView* Create(
+ RenderThreadBase* render_thread,
HWND parent_hwnd,
HANDLE modal_dialog_event,
int32 opener_id,
@@ -305,12 +309,18 @@
// This is called from within the renderer, not via an IPC message.
void OnDebugDetach();
+ int delay_seconds_for_form_state_sync() const {
+ return delay_seconds_for_form_state_sync_;
+ }
+ void set_delay_seconds_for_form_state_sync(int delay_in_seconds) {
+ delay_seconds_for_form_state_sync_ = delay_in_seconds;
+ }
+
private:
- RenderView();
+ FRIEND_TEST(RenderViewTest, OnLoadAlternateHTMLText);
+ FRIEND_TEST(RenderViewTest, OnNavStateChanged);
- // When we are created from window.open from an already existing view, this
- // constructor stores that view ID.
- explicit RenderView(int32 opener_id);
+ explicit RenderView(RenderThreadBase* render_thread);
// Initializes this view with the given parent and ID. The |routing_id| can be
// set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case,
@@ -711,6 +721,12 @@
// from the Browser process telling us otherwise.
bool popup_notification_visible_;
+ // Time in seconds of the delay between syncing page state such as form
+ // elements and scroll position. This timeout allows us to avoid spamming the
+ // browser process with every little thing that changes. This normally doesn't
+ // change but is overridden by tests.
+ int delay_seconds_for_form_state_sync_;
+
DISALLOW_COPY_AND_ASSIGN(RenderView);
};
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698