当前位置: 首页>>代码示例>>C++>>正文


C++ CefRefPtr::GetBrowserHwnd方法代码示例

本文整理汇总了C++中CefRefPtr::GetBrowserHwnd方法的典型用法代码示例。如果您正苦于以下问题:C++ CefRefPtr::GetBrowserHwnd方法的具体用法?C++ CefRefPtr::GetBrowserHwnd怎么用?C++ CefRefPtr::GetBrowserHwnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CefRefPtr的用法示例。


在下文中一共展示了CefRefPtr::GetBrowserHwnd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: URLEntryActivate

// Callback for when you press enter in the URL box.
void URLEntryActivate(GtkEntry* entry) {
  if (!g_handler.get() || !g_handler->GetBrowserHwnd())
    return;

  const gchar* url = gtk_entry_get_text(entry);
  g_handler->GetBrowser()->GetMainFrame()->LoadURL(std::string(url).c_str());
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:8,代码来源:cefclient_gtk.cpp

示例2: DragDropActivated

gboolean DragDropActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd()) {
    CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
    RunDragDropTest(browser);
  }

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:8,代码来源:cefclient_gtk.cpp

示例3: ShowDevtoolsActivated

gboolean ShowDevtoolsActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd()) {
    CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
    browser->ShowDevTools();
  }

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:8,代码来源:cefclient_gtk.cpp

示例4: ZoomResetActivated

// Callback for Debug > Zoom Reset... menu item.
gboolean ZoomResetActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd()) {
    CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
    browser->SetZoomLevel(0.0);
  }

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:9,代码来源:cefclient_gtk.cpp

示例5: HandleFocus

// WebViewDelegate::TakeFocus in the test webview delegate.
static gboolean HandleFocus(GtkWidget* widget,
                            GdkEventFocus* focus) {
  if (g_handler.get() && g_handler->GetBrowserHwnd()) {
    // Give focus to the browser window.
    g_handler->GetBrowser()->SetFocus(true);
  }

  return TRUE;
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:10,代码来源:cefclient_gtk.cpp

示例6: JSExtensionActivated

// Callback for Debug > JS Extension... menu item.
gboolean JSExtensionActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    RunExtensionTest(g_handler->GetBrowser());

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:7,代码来源:cefclient_gtk.cpp

示例7: JSBindngActivated

// Callback for Debug > JS Binding... menu item.
gboolean JSBindngActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    RunBindingTest(g_handler->GetBrowser());

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:7,代码来源:cefclient_gtk.cpp

示例8: PopupWindowActivated

// Callback for Debug > Popup Window... menu item.
gboolean PopupWindowActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    RunPopupTest(g_handler->GetBrowser());

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:7,代码来源:cefclient_gtk.cpp

示例9: WndProc

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
    PAINTSTRUCT ps;
    HDC hdc;
    switch (message) {
    case WM_CREATE: {
        g_handler = new ClientHandler();
        RECT rect;
        GetClientRect(hWnd, &rect);
        CefBrowserSettings settings;
        settings.plugins_disabled = false;
        settings.file_access_from_file_urls_allowed = true;
        settings.universal_access_from_file_urls_allowed = true;
        CefWindowInfo info;
        info.SetAsChild(hWnd, rect);
        WCHAR full_path[MAX_PATH];
        get_abs_path_exe(L"web\\search.htm",full_path);
        if(_waccess(full_path,0)==0) {
            CefBrowser::CreateBrowser(info,
                                      static_cast<CefRefPtr<CefClient>>(g_handler), full_path,settings);
        } else if(_waccess(L"E:\\Documents\\gigaso\\browser\\web\\search2.htm",0)==0) {
            CefBrowser::CreateBrowser(info,
                                      static_cast<CefRefPtr<CefClient>>(g_handler), L"E:\\Documents\\gigaso\\browser\\web\\search2.htm",settings);
        } else {
            CefBrowser::CreateBrowser(info,
                                      static_cast<CefRefPtr<CefClient>>(g_handler), L"about:blank",settings);
        }
    }
    return 0;
    case WM_ACTIVATE:
        if((short)wParam!=WA_INACTIVE) {
            //SetForegroundWindow(hWnd);
            trans_focus();
        }
        return 0;
    case WM_PAINT:
        hdc = BeginPaint(hWnd, &ps);
        EndPaint(hWnd, &ps);
        return 0;
    case WM_SETFOCUS:
        trans_focus();
        return 0;
    case WM_SIZE:
        if(g_handler.get() && g_handler->GetBrowserHwnd()) {
            RECT rect;
            GetClientRect(hWnd, &rect);
            HDWP hdwp = BeginDeferWindowPos(1);
            hdwp = DeferWindowPos(hdwp, g_handler->GetBrowserHwnd(), NULL,
                                  rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
                                  SWP_NOZORDER);
            EndDeferWindowPos(hdwp);
        }
        break;
    case WM_ERASEBKGND:
        if(g_handler.get() && g_handler->GetBrowserHwnd()) {
            // Dont erase the background if the browser window has been loaded
            // (this avoids flashing)
            return 0;
        }
        break;
    case WM_CLOSE:
        // All clients must forward the WM_CLOSE call to all contained browser
        // windows to give those windows a chance to cleanup before the window
        // closes. Don't forward this message if you are cancelling the request.
        if(g_handler.get())
        {
            HWND hWnd = g_handler->GetBrowserHwnd();
            if (hWnd)
                ::SendMessage(hWnd, WM_CLOSE, 0, 0);
        }
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        return 0;
    }
    return DefWindowProc(hWnd, message, wParam, lParam);
}
开发者ID:yuanxinyu,项目名称:pea-search,代码行数:76,代码来源:search_cef.cpp

示例10: WebURLRequestActivated

// Callback for Debug > WebURLRequest... menu item.
gboolean WebURLRequestActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    RunWebURLRequestTest(g_handler->GetBrowser());

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:7,代码来源:cefclient_gtk.cpp

示例11: BackButtonClicked

// Callback for when you click the back button.
void BackButtonClicked(GtkButton* button) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    g_handler->GetBrowser()->GoBack();
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:5,代码来源:cefclient_gtk.cpp

示例12: HTML5VideoActivated

// Callback for Debug > HTML5 Video... menu item.
gboolean HTML5VideoActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    RunHTML5VideoTest(g_handler->GetBrowser());

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:7,代码来源:cefclient_gtk.cpp

示例13: AcceleratedLayersActivated

// Callback for Debug > Accelerated Layers:... menu item.
gboolean AcceleratedLayersActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    RunAcceleratedLayersTest(g_handler->GetBrowser());

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:7,代码来源:cefclient_gtk.cpp

示例14: JSExecuteActivated

// Callback for Debug > JS Execute... menu item.
gboolean JSExecuteActivated(GtkWidget* widget) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    RunJavaScriptExecuteTest(g_handler->GetBrowser());

  return FALSE;  // Don't stop this message.
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:7,代码来源:cefclient_gtk.cpp

示例15: ForwardButtonClicked

// Callback for when you click the forward button.
void ForwardButtonClicked(GtkButton* button) {
  if (g_handler.get() && g_handler->GetBrowserHwnd())
    g_handler->GetBrowser()->GoForward();
}
开发者ID:anntt,项目名称:chromiumembedded,代码行数:5,代码来源:cefclient_gtk.cpp


注:本文中的CefRefPtr::GetBrowserHwnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。