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

Side by Side Diff: core/cross/client.h

Issue 164130: This CL adds client.toDataURL which gets the contents... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 // Stops the timer for the code range identified by key. 389 // Stops the timer for the code range identified by key.
390 void ProfileStop(const std::string& key); 390 void ProfileStop(const std::string& key);
391 391
392 // Resets the profiler, clearing out all data. 392 // Resets the profiler, clearing out all data.
393 void ProfileReset(); 393 void ProfileReset();
394 394
395 // Dumps all profiler state to a string. 395 // Dumps all profiler state to a string.
396 String ProfileToString(); 396 String ProfileToString();
397 397
398 // Saves a png screenshot of the display buffer. 398 // Reutrns a data: URL of the client area in png format.
399 // Returns true on success and false on failure. 399 String ToDataURL();
400 bool SaveScreen(const String& file_name);
401 400
402 // This class is intended to be used on the stack, such that the variable gets 401 // This class is intended to be used on the stack, such that the variable gets
403 // incremented on scope entry and decremented on scope exit. It's currently 402 // incremented on scope entry and decremented on scope exit. It's currently
404 // used in WindowProc to determine if we're reentrant or not, but may be 403 // used in WindowProc to determine if we're reentrant or not, but may be
405 // needed on other platforms as well. 404 // needed on other platforms as well.
406 class ScopedIncrement { 405 class ScopedIncrement {
407 public: 406 public:
408 explicit ScopedIncrement(Client *client) { 407 explicit ScopedIncrement(Client *client) {
409 DCHECK(client); 408 DCHECK(client);
410 client_ = client; 409 client_ = client;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 Id id_; 496 Id id_;
498 497
499 int calls_; // Used to check reentrancy along with ScopedIncrement. 498 int calls_; // Used to check reentrancy along with ScopedIncrement.
500 499
501 DISALLOW_COPY_AND_ASSIGN(Client); 500 DISALLOW_COPY_AND_ASSIGN(Client);
502 }; // Client 501 }; // Client
503 502
504 } // namespace o3d 503 } // namespace o3d
505 504
506 #endif // O3D_CORE_CROSS_CLIENT_H_ 505 #endif // O3D_CORE_CROSS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698