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

Unified Diff: webkit/glue/webframe_impl.h

Issue 335019: Replace MessageLoop+ScopedRunnableMethodFactory with WebCore::Timer+Vector... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/chrome_client_impl.cc ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframe_impl.h
===================================================================
--- webkit/glue/webframe_impl.h (revision 29946)
+++ webkit/glue/webframe_impl.h (working copy)
@@ -31,7 +31,6 @@
#include <wtf/OwnPtr.h>
#include <wtf/RefCounted.h>
-#include "base/task.h"
#include "webkit/api/public/WebFrame.h"
#include "webkit/glue/webframeloaderclient_impl.h"
@@ -268,10 +267,6 @@
WebFrameLoaderClient frame_loader_client_;
- // This is a factory for creating cancelable tasks for this frame that run
- // asynchronously in order to scope string matches during a find operation.
- ScopedRunnableMethodFactory<WebFrameImpl> scope_matches_factory_;
-
RefPtr<ClientHandle> client_handle_;
// This is a weak pointer to our corresponding WebCore frame. A reference to
@@ -328,6 +323,9 @@
int next_invalidate_after_;
private:
+ class DeferredScopeStringMatches;
+ friend class DeferredScopeStringMatches;
+
// A bit mask specifying area of the frame to invalidate.
enum AreaToInvalidate {
INVALIDATE_NOTHING = 0,
@@ -362,6 +360,17 @@
// was searched.
bool ShouldScopeMatches(const string16& search_text);
+ // Queue up a deferred call to scopeStringMatches.
+ void ScopeStringMatchesSoon(
+ int identifier, const WebKit::WebString& search_text,
+ const WebKit::WebFindOptions& options, bool reset);
+
+ // Called by a DeferredScopeStringMatches instance.
+ void CallScopeStringMatches(
+ DeferredScopeStringMatches* deferred,
+ int identifier, const WebKit::WebString& search_text,
+ const WebKit::WebFindOptions& options, bool reset);
+
// Determines whether to invalidate the content area and scrollbar.
void InvalidateIfNecessary();
@@ -370,6 +379,9 @@
void LoadJavaScriptURL(const WebCore::KURL& url);
+ // A list of all of the pending calls to scopeStringMatches.
+ Vector<DeferredScopeStringMatches*> deferred_scoping_work_;
+
// Valid between calls to BeginPrint() and EndPrint(). Containts the print
// information. Is used by PrintPage().
OwnPtr<ChromePrintContext> print_context_;
« no previous file with comments | « webkit/glue/chrome_client_impl.cc ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698