mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Fix initial state of the |is_showing_| flag in CefRenderWidgetHostViewOSR (issue #1363).
- Windows: Modify the cefclient OSR example to call WasHidden(true) when the app is minimized. git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/2062@1819 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -18,7 +18,13 @@
|
||||
#include "cefclient/string_util.h"
|
||||
|
||||
CefRefPtr<ClientHandler> g_handler;
|
||||
|
||||
namespace {
|
||||
|
||||
CefRefPtr<CefCommandLine> g_command_line;
|
||||
int g_offscreen_state = 0;
|
||||
|
||||
} // namespace
|
||||
|
||||
CefRefPtr<CefBrowser> AppGetBrowser() {
|
||||
if (!g_handler.get())
|
||||
@ -78,11 +84,15 @@ void AppGetBrowserSettings(CefBrowserSettings& settings) {
|
||||
}
|
||||
|
||||
bool AppIsOffScreenRenderingEnabled() {
|
||||
DCHECK(g_command_line.get());
|
||||
if (!g_command_line.get())
|
||||
return false;
|
||||
if (g_offscreen_state == 0) {
|
||||
// Store the value so it isn't queried multiple times.
|
||||
DCHECK(g_command_line.get());
|
||||
g_offscreen_state =
|
||||
g_command_line->HasSwitch(cefclient::kOffScreenRenderingEnabled) ?
|
||||
1 : 2;
|
||||
}
|
||||
|
||||
return g_command_line->HasSwitch(cefclient::kOffScreenRenderingEnabled);
|
||||
return (g_offscreen_state == 1);
|
||||
}
|
||||
|
||||
void RunGetSourceTest(CefRefPtr<CefBrowser> browser) {
|
||||
|
Reference in New Issue
Block a user