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

Side by Side Diff: third_party/WebKit/public/web/WebKit.h

Issue 2402983002: [TimeZoneMonitor] Decouple renderer side impl from content to blink. (Closed)
Patch Set: content_unittests does not need to init mojo edk any more by itself Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 namespace blink { 37 namespace blink {
38 38
39 // Initialize the entire Blink (wtf, platform, core, modules and web). 39 // Initialize the entire Blink (wtf, platform, core, modules and web).
40 // If you just need wtf and platform, use Platform::initialize instead. 40 // If you just need wtf and platform, use Platform::initialize instead.
41 // 41 //
42 // Must be called on the thread that will be the main thread before 42 // Must be called on the thread that will be the main thread before
43 // using any other public APIs. The provided Platform; must be 43 // using any other public APIs. The provided Platform; must be
44 // non-null and must remain valid until the current thread calls shutdown. 44 // non-null and must remain valid until the current thread calls shutdown.
45 BLINK_EXPORT void initialize(Platform*); 45 BLINK_EXPORT void initialize(Platform*);
46 46
47 // Blink's mojo stuff must be initialized with 2 prerequisites:
blundell 2016/10/18 12:32:11 Ah I see, this is where you added the comment. Gre
48 // 1, Mojo edk initialized;
49 // 2, A message loop is ready for current thread.
50 // For production code it's sure that above 2 are already fullfilled before
blundell 2016/10/18 12:32:11 This comment strengthens my belief that we should
leonhsl(Using Gerrit) 2016/10/18 14:34:48 Acknowledged.
leonhsl(Using Gerrit) 2016/10/19 08:47:23 Done. Referring the naming practice of other APIs
51 // calling blink::initialize(), so the mojo stuff will be initialized along with
52 // other stuff(platform, core, modules etc.) as well. But this could be no for
53 // some test codes, when they call blink::initialize() maybe they have not
54 // gotten Mojo edk or message loop ready yet, maybe they would fullfill the
55 // above 2 prerequisites later according with their code logic, in such case we
56 // provide this API to give them another opportunity to initialize the mojo
57 // stuff, which has been skipped by blink::initialize().
haraken 2016/10/18 19:39:11 Hmm, would you summarize why you cannot just use i
leonhsl(Using Gerrit) 2016/10/19 08:47:23 Inside Blink, as about the mojo stuff that must be
58 BLINK_EXPORT void initializeMojo();
59
47 // Get the V8 Isolate for the main thread. 60 // Get the V8 Isolate for the main thread.
48 // initialize must have been called first. 61 // initialize must have been called first.
49 BLINK_EXPORT v8::Isolate* mainThreadIsolate(); 62 BLINK_EXPORT v8::Isolate* mainThreadIsolate();
50 63
51 // Once shutdown, the Platform passed to initialize will no longer 64 // Once shutdown, the Platform passed to initialize will no longer
52 // be accessed. No other WebKit objects should be in use when this function is 65 // be accessed. No other WebKit objects should be in use when this function is
53 // called. Any background threads created by WebKit are promised to be 66 // called. Any background threads created by WebKit are promised to be
54 // terminated by the time this function returns. 67 // terminated by the time this function returns.
55 BLINK_EXPORT void shutdown(); 68 BLINK_EXPORT void shutdown();
56 69
(...skipping 24 matching lines...) Expand all
81 // Send memory pressure notification to worker thread isolate. 94 // Send memory pressure notification to worker thread isolate.
82 BLINK_EXPORT void MemoryPressureNotificationToWorkerThreadIsolates( 95 BLINK_EXPORT void MemoryPressureNotificationToWorkerThreadIsolates(
83 v8::MemoryPressureLevel); 96 v8::MemoryPressureLevel);
84 97
85 // Set the RAIL performance mode on all worker thread isolates. 98 // Set the RAIL performance mode on all worker thread isolates.
86 BLINK_EXPORT void setRAILModeOnWorkerThreadIsolates(v8::RAILMode); 99 BLINK_EXPORT void setRAILModeOnWorkerThreadIsolates(v8::RAILMode);
87 100
88 } // namespace blink 101 } // namespace blink
89 102
90 #endif 103 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698