本文整理汇总了C++中IWebNotificationCenter::postNotificationName方法的典型用法代码示例。如果您正苦于以下问题:C++ IWebNotificationCenter::postNotificationName方法的具体用法?C++ IWebNotificationCenter::postNotificationName怎么用?C++ IWebNotificationCenter::postNotificationName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IWebNotificationCenter
的用法示例。
在下文中一共展示了IWebNotificationCenter::postNotificationName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: respondToChangedSelection
void WebEditorClient::respondToChangedSelection()
{
m_webView->selectionChanged();
static BSTR webViewDidChangeSelectionNotificationName = SysAllocString(WebViewDidChangeSelectionNotification);
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(webViewDidChangeSelectionNotificationName, static_cast<IWebView*>(m_webView), 0);
}
示例2: didRemoveFromWebView
void WebPreferences::didRemoveFromWebView()
{
ASSERT(m_numWebViews);
if (--m_numWebViews == 0) {
IWebNotificationCenter* nc = WebNotificationCenter::defaultCenterInternal();
nc->postNotificationName(webPreferencesRemovedNotification(), static_cast<IWebPreferences*>(this), 0);
}
}
示例3: respondToChangedSelection
void WebEditorClient::respondToChangedSelection(Frame*)
{
m_webView->selectionChanged();
static _bstr_t webViewDidChangeSelectionNotificationName(WebViewDidChangeSelectionNotification);
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(webViewDidChangeSelectionNotificationName.GetBSTR(), static_cast<IWebView*>(m_webView), 0);
}
示例4: postPreferencesChangesNotification
HRESULT WebPreferences::postPreferencesChangesNotification()
{
IWebNotificationCenter* nc = WebNotificationCenter::defaultCenterInternal();
HRESULT hr = nc->postNotificationName(webPreferencesChangedNotification(), static_cast<IWebPreferences*>(this), 0);
if (FAILED(hr))
return hr;
return S_OK;
}
示例5: postDidAddIconNotification
static void postDidAddIconNotification(const String& pageURL, WebIconDatabase* iconDB)
{
HashMap<String, String> dictionary;
dictionary.set(WebIconDatabase::iconDatabaseNotificationUserInfoURLKey(), pageURL);
COMPtr<IPropertyBag> userInfo(AdoptCOM, COMPropertyBag<String>::adopt(dictionary));
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(WebIconDatabase::iconDatabaseDidAddIconNotification(), static_cast<IWebIconDatabase*>(iconDB), userInfo.get());
}
示例6: postDidAddIconNotification
static void postDidAddIconNotification(const String& pageURL, WebIconDatabase* iconDB)
{
RetainPtr<CFMutableDictionaryRef> dictionary = adoptCF(
CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
CFDictionaryAddValue(dictionary.get(), WebIconDatabase::iconDatabaseNotificationUserInfoURLKey(), pageURL.createCFString().get());
COMPtr<CFDictionaryPropertyBag> userInfo = CFDictionaryPropertyBag::createInstance();
userInfo->setDictionary(dictionary.get());
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(WebIconDatabase::iconDatabaseDidAddIconNotification(), static_cast<IWebIconDatabase*>(iconDB), userInfo.get());
}
示例7: postProgressFinishedNotification
void WebFrameLoaderClient::postProgressFinishedNotification()
{
static BSTR progressFinishedName = SysAllocString(WebViewProgressFinishedNotification);
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(progressFinishedName, static_cast<IWebView*>(m_webFrame->webView()), 0);
}
示例8: postDidRemoveAllIconsNotification
static void postDidRemoveAllIconsNotification(WebIconDatabase* iconDB)
{
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(WebIconDatabase::iconDatabaseDidRemoveAllIconsNotification(), static_cast<IWebIconDatabase*>(iconDB), 0);
}
示例9: progressEstimateChanged
void WebFrameLoaderClient::progressEstimateChanged(WebCore::Frame&)
{
static BSTR progressEstimateChangedName = SysAllocString(WebViewProgressEstimateChangedNotification);
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(progressEstimateChangedName, static_cast<IWebView*>(m_webFrame->webView()), 0);
}
示例10: didEndEditing
void WebEditorClient::didEndEditing()
{
static _bstr_t webViewDidEndEditingNotificationName(WebViewDidEndEditingNotification);
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(webViewDidEndEditingNotificationName.GetBSTR(), static_cast<IWebView*>(m_webView), nullptr);
}
示例11: respondToChangedContents
void WebEditorClient::respondToChangedContents()
{
static _bstr_t webViewDidChangeNotificationName(WebViewDidChangeNotification);
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
notifyCenter->postNotificationName(webViewDidChangeNotificationName.GetBSTR(), static_cast<IWebView*>(m_webView), 0);
}