void BrowserWindow::OnBrowserCreated(CefRefPtr<CefBrowser> browser) { REQUIRE_MAIN_THREAD(); DCHECK(!browser_); browser_ = browser; delegate_->OnBrowserCreated(browser); // cant close here, doesnt work on cefclient }
void BrowserWindow::OnBrowserClosed(CefRefPtr<CefBrowser> browser) { REQUIRE_MAIN_THREAD(); if (browser_.get()) { DCHECK_EQ(browser->GetIdentifier(), browser_->GetIdentifier()); browser_ = NULL; } client_handler_->DetachDelegate(); client_handler_ = NULL; // |this| may be deleted. delegate_->OnBrowserWindowDestroyed(); }
void MainMessageLoopExternalPump::OnScheduleWork(int64 delay_ms) { REQUIRE_MAIN_THREAD(); if (delay_ms == kTimerDelayPlaceholder && IsTimerPending()) { // Don't set the maximum timer requested from DoWork() if a timer event is // currently pending. return; } KillTimer(); if (delay_ms <= 0) { // Execute the work immediately. DoWork(); } else { // Never wait longer than the maximum allowed time. if (delay_ms > kMaxTimerDelay) delay_ms = kMaxTimerDelay; // Results in call to OnTimerTimeout() after the specified delay. SetTimer(delay_ms); } }
void BrowserWindow::OnSetDraggableRegions( const std::vector<CefDraggableRegion>& regions) { REQUIRE_MAIN_THREAD(); delegate_->OnSetDraggableRegions(regions); }
void BrowserWindow::OnSetLoadingState(bool isLoading, bool canGoBack, bool canGoForward) { REQUIRE_MAIN_THREAD(); delegate_->OnSetLoadingState(isLoading, canGoBack, canGoForward); }
void BrowserWindow::OnSetFullscreen(bool fullscreen) { REQUIRE_MAIN_THREAD(); delegate_->OnSetFullscreen(fullscreen); }
void BrowserWindow::OnSetTitle(const std::string& title) { REQUIRE_MAIN_THREAD(); delegate_->OnSetTitle(title); }
void BrowserWindow::OnSetAddress(const std::string& url) { REQUIRE_MAIN_THREAD(); delegate_->OnSetAddress(url); }
void BrowserWindow::OnBrowserClosing(CefRefPtr<CefBrowser> browser) { REQUIRE_MAIN_THREAD(); DCHECK_EQ(browser->GetIdentifier(), browser_->GetIdentifier()); is_closing_ = true; }
bool BrowserWindow::IsClosing() const { REQUIRE_MAIN_THREAD(); return is_closing_; }
CefRefPtr<CefBrowser> BrowserWindow::GetBrowser() const { REQUIRE_MAIN_THREAD(); return browser_; }
void MainMessageLoopExternalPump::OnTimerTimeout() { REQUIRE_MAIN_THREAD(); KillTimer(); DoWork(); }