cefclient: Add example of window manipulation via JavaScript (issue #925).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1166 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-04-01 17:57:28 +00:00
parent ea735c2663
commit e1f8c276f8
14 changed files with 475 additions and 1 deletions

View File

@ -18,6 +18,7 @@
#include "cefclient/performance_test.h"
#include "cefclient/scheme_test.h"
#include "cefclient/string_util.h"
#include "cefclient/window_test.h"
char szWorkingDir[512]; // The current working directory
@ -123,6 +124,14 @@ gboolean DialogsActivated(GtkWidget* widget) {
return FALSE; // Don't stop this message.
}
// Callback for Debug > Window... menu item.
gboolean WindowActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
window_test::RunTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Plugin Info... menu item.
gboolean PluginInfoActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
@ -307,6 +316,8 @@ GtkWidget* CreateMenuBar() {
G_CALLBACK(PerformanceActivated));
AddMenuEntry(debug_menu, "Dialogs",
G_CALLBACK(DialogsActivated));
AddMenuEntry(debug_menu, "Window",
G_CALLBACK(WindowActivated));
AddMenuEntry(debug_menu, "Plugin Info",
G_CALLBACK(PluginInfoActivated));
AddMenuEntry(debug_menu, "DOM Access",