mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Mac:
- Fix compile errors. - Add support for creating hidden windows and TEST_REDIRECT_POPUP_URLS. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@201 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -775,7 +775,7 @@ bool CefBrowserImpl::UIT_Navigate(const BrowserNavigationEntry& entry,
|
||||
view->setFocusedFrame(frame);
|
||||
|
||||
// Give focus to the window if it is currently visible.
|
||||
if(IsWindowVisible(UIT_GetMainWndHandle()))
|
||||
if(UIT_IsViewVisible(UIT_GetMainWndHandle()))
|
||||
UIT_SetFocus(UIT_GetWebViewHost(), true);
|
||||
}
|
||||
|
||||
|
@@ -280,6 +280,7 @@ public:
|
||||
|
||||
protected:
|
||||
static void UIT_CloseView(gfx::NativeView view);
|
||||
static bool UIT_IsViewVisible(gfx::NativeView view);
|
||||
|
||||
void UIT_CreateDevToolsClient(BrowserDevToolsAgent* agent);
|
||||
void UIT_DestroyDevToolsClient();
|
||||
|
@@ -91,7 +91,7 @@ void CefBrowserImpl::UIT_CreateBrowser(const CefString& url)
|
||||
|
||||
Unlock();
|
||||
|
||||
if (newWnd != nil) {
|
||||
if (newWnd != nil && !window_info_.m_bHidden) {
|
||||
// Show the window.
|
||||
[newWnd makeKeyAndOrderFront: nil];
|
||||
}
|
||||
@@ -156,5 +156,13 @@ int CefBrowserImpl::UIT_GetPagesCount(WebKit::WebFrame* frame)
|
||||
// static
|
||||
void CefBrowserImpl::UIT_CloseView(gfx::NativeView view)
|
||||
{
|
||||
[view performSelector:@selector(performClose:) withObject:nil afterDelay:0];
|
||||
[[view window] performSelector:@selector(performClose:)
|
||||
withObject:nil
|
||||
afterDelay:0];
|
||||
}
|
||||
|
||||
// static
|
||||
bool CefBrowserImpl::UIT_IsViewVisible(gfx::NativeView view)
|
||||
{
|
||||
return [[view window] isVisible];
|
||||
}
|
||||
|
@@ -488,3 +488,9 @@ void CefBrowserImpl::UIT_CloseView(gfx::NativeView view)
|
||||
{
|
||||
PostMessage(view, WM_CLOSE, 0, 0);
|
||||
}
|
||||
|
||||
// static
|
||||
bool CefBrowserImpl::UIT_IsViewVisible(gfx::NativeView view)
|
||||
{
|
||||
return IsWindowVisible(view) ? true : false;
|
||||
}
|
||||
|
@@ -409,10 +409,12 @@ bool CefRegisterScheme(const CefString& scheme_name,
|
||||
// RunnableMethodTraits::RetainCallee() (originating from NewRunnableMethod)
|
||||
// will call AddRef() and Release() on the object in debug mode, resulting in
|
||||
// the object being deleted if it doesn't already have a reference.
|
||||
std::string hostNameStr;
|
||||
if (is_standard)
|
||||
hostNameStr = host_name;
|
||||
CefRefPtr<SchemeRequestJobWrapper> wrapper(
|
||||
new SchemeRequestJobWrapper(scheme_name,
|
||||
(is_standard?host_name:std::string()),
|
||||
is_standard, factory));
|
||||
new SchemeRequestJobWrapper(scheme_name, hostNameStr, is_standard,
|
||||
factory));
|
||||
|
||||
CefThread::PostTask(CefThread::UI, FROM_HERE, NewRunnableMethod(wrapper.get(),
|
||||
&SchemeRequestJobWrapper::RegisterScheme));
|
||||
|
Reference in New Issue
Block a user