mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -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",
|
||||
|
Reference in New Issue
Block a user