cef/tests/cefsimple/simple_handler_gtk.cpp
Marshall Greenblatt d6f47eba76 Create 1916 release branch for CEF3.
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1916@1654 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-04-11 21:13:32 +00:00

23 lines
702 B
C++

// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include "cefsimple/simple_handler.h"
#include <gtk/gtk.h>
#include <string>
#include "cefsimple/util.h"
#include "include/cef_browser.h"
void SimpleHandler::OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) {
REQUIRE_UI_THREAD();
GtkWidget* window = gtk_widget_get_ancestor(
GTK_WIDGET(browser->GetHost()->GetWindowHandle()),
GTK_TYPE_WINDOW);
std::string titleStr(title);
gtk_window_set_title(GTK_WINDOW(window), titleStr.c_str());
}