1// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights 2// reserved. Use of this source code is governed by a BSD-style license that 3// can be found in the LICENSE file. 4 5#include "tests/cefsimple/simple_handler.h" 6 7#import <Cocoa/Cocoa.h> 8 9#include "include/cef_browser.h" 10 11void SimpleHandler::PlatformTitleChange(CefRefPtr<CefBrowser> browser, 12 const CefString& title) { 13 NSView* view = 14 CAST_CEF_WINDOW_HANDLE_TO_NSVIEW(browser->GetHost()->GetWindowHandle()); 15 NSWindow* window = [view window]; 16 std::string titleStr(title); 17 NSString* str = [NSString stringWithUTF8String:titleStr.c_str()]; 18 [window setTitle:str]; 19} 20