mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
cefclient: Use test_runner::Alert instead of platform-specific notifications (issue #1500).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1984 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -34,8 +34,6 @@ extern CefRefPtr<ClientHandler> g_handler;
|
||||
|
||||
namespace {
|
||||
|
||||
char szWorkingDir[512]; // The current working directory
|
||||
|
||||
// Height of the buttons at the top of the GTK window.
|
||||
int g_toolbar_height = 0;
|
||||
|
||||
@@ -334,9 +332,6 @@ int main(int argc, char* argv[]) {
|
||||
if (exit_code >= 0)
|
||||
return exit_code;
|
||||
|
||||
if (!getcwd(szWorkingDir, sizeof (szWorkingDir)))
|
||||
return -1;
|
||||
|
||||
// Parse command line arguments.
|
||||
AppInitCommandLine(argc, argv_copy);
|
||||
|
||||
@@ -498,6 +493,15 @@ int main(int argc, char* argv[]) {
|
||||
// Global functions
|
||||
|
||||
std::string AppGetWorkingDirectory() {
|
||||
char szWorkingDir[256];
|
||||
if (getcwd(szWorkingDir, sizeof(szWorkingDir) - 1) == NULL) {
|
||||
szWorkingDir[0] = 0;
|
||||
} else {
|
||||
// Add trailing path separator.
|
||||
size_t len = strlen(szWorkingDir);
|
||||
szWorkingDir[len] = '/';
|
||||
szWorkingDir[len + 1] = 0;
|
||||
}
|
||||
return szWorkingDir;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user