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

Side by Side Diff: public/platform/WebThread.h

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « public/platform/WebSize.h ('k') | public/platform/linux/WebFontRenderStyle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 15 matching lines...) Expand all
26 #define WebThread_h 26 #define WebThread_h
27 27
28 #include "WebCommon.h" 28 #include "WebCommon.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 // Provides an interface to an embedder-defined thread implementation. 32 // Provides an interface to an embedder-defined thread implementation.
33 // 33 //
34 // Deleting the thread blocks until all pending, non-delayed tasks have been 34 // Deleting the thread blocks until all pending, non-delayed tasks have been
35 // run. 35 // run.
36 class WebThread { 36 class BLINK_PLATFORM_EXPORT WebThread {
37 public: 37 public:
38 class Task { 38 class Task {
39 public: 39 public:
40 virtual ~Task() { } 40 virtual ~Task() { }
41 virtual void run() = 0; 41 virtual void run() = 0;
42 }; 42 };
43 43
44 class TaskObserver { 44 class BLINK_PLATFORM_EXPORT TaskObserver {
45 public: 45 public:
46 virtual ~TaskObserver() { } 46 virtual ~TaskObserver() { }
47 virtual void willProcessTask() = 0; 47 virtual void willProcessTask() = 0;
48 virtual void didProcessTask() = 0; 48 virtual void didProcessTask() = 0;
49 }; 49 };
50 50
51 // postTask() and postDelayedTask() take ownership of the passed Task 51 // postTask() and postDelayedTask() take ownership of the passed Task
52 // object. It is safe to invoke postTask() and postDelayedTask() from any 52 // object. It is safe to invoke postTask() and postDelayedTask() from any
53 // thread. 53 // thread.
54 virtual void postTask(Task*) = 0; 54 virtual void postTask(Task*) = 0;
(...skipping 12 matching lines...) Expand all
67 // exitRunLoop() runs tasks until there are no tasks available to run, then returns control to the caller of enterRunLoop(). 67 // exitRunLoop() runs tasks until there are no tasks available to run, then returns control to the caller of enterRunLoop().
68 // Must be called when the WebThread is running. 68 // Must be called when the WebThread is running.
69 virtual void exitRunLoop() = 0; 69 virtual void exitRunLoop() = 0;
70 70
71 virtual ~WebThread() { } 71 virtual ~WebThread() { }
72 }; 72 };
73 73
74 } // namespace blink 74 } // namespace blink
75 75
76 #endif 76 #endif
OLDNEW
« no previous file with comments | « public/platform/WebSize.h ('k') | public/platform/linux/WebFontRenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698