Exemplo n.º 1
0
void WebPopupMenuImpl::initialize(FramelessScrollView* widget, const WebRect& bounds)
{
    m_widget = widget;
    m_widget->setClient(this);

    if (m_client) {
        m_client->setWindowRect(bounds);
        m_client->show(WebNavigationPolicy()); // Policy is ignored.
    }
}
Exemplo n.º 2
0
bool WebPagePopupImpl::initialize(WebViewImpl* webView,
                                  PagePopupClient* popupClient) {
  DCHECK(webView);
  DCHECK(popupClient);
  m_webView = webView;
  m_popupClient = popupClient;

  if (!m_widgetClient || !initializePage())
    return false;
  m_widgetClient->show(WebNavigationPolicy());
  setFocus(true);

  return true;
}
Exemplo n.º 3
0
void WebPopupMenuImpl::initialize(PopupContainer* widget, const WebRect& bounds)
{
    m_widget = widget;
    m_widget->setClient(this);

    if (!m_client)
        return;
    m_client->setWindowRect(bounds);
    m_client->show(WebNavigationPolicy()); // Policy is ignored.

    m_client->initializeLayerTreeView();
    m_layerTreeView = m_client->layerTreeView();
    if (m_layerTreeView) {
        m_layerTreeView->setVisible(true);
        m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor());
        m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(this));
        m_rootLayer->layer()->setBounds(m_size);
        m_layerTreeView->setRootLayer(*m_rootLayer->layer());
    }
}
Exemplo n.º 4
0
void WebPopupMenuImpl::initialize(PopupContainer* widget, const WebRect& bounds)
{
    m_widget = widget;
    m_widget->setClient(this);

    if (!m_client)
        return;
    m_client->setWindowRect(bounds);
    m_client->show(WebNavigationPolicy()); // Policy is ignored.

    m_client->initializeLayerTreeView();
    m_layerTreeView = m_client->layerTreeView();
    if (m_layerTreeView) {
        m_layerTreeView->setVisible(true);
        m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor());
        m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(this));
        m_rootLayer->layer()->setBounds(m_size);
        // FIXME: Legacy LCD behavior (http://crbug.com/436821), but are we always guaranteed to be opaque?
        m_rootLayer->layer()->setOpaque(true);
        m_layerTreeView->setRootLayer(*m_rootLayer->layer());
    }
}