mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Create 1453 release branch for CEF3.
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1453@1183 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
42
cef3/libcef/browser/browser_info.cc
Normal file
42
cef3/libcef/browser/browser_info.cc
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that can
|
||||
// be found in the LICENSE file.
|
||||
|
||||
#include "libcef/browser/browser_info.h"
|
||||
#include "ipc/ipc_message.h"
|
||||
|
||||
CefBrowserInfo::CefBrowserInfo(int browser_id, bool is_popup)
|
||||
: browser_id_(browser_id),
|
||||
is_popup_(is_popup),
|
||||
render_process_id_(MSG_ROUTING_NONE),
|
||||
render_view_id_(MSG_ROUTING_NONE) {
|
||||
DCHECK_GT(browser_id, 0);
|
||||
}
|
||||
|
||||
CefBrowserInfo::~CefBrowserInfo() {
|
||||
}
|
||||
|
||||
void CefBrowserInfo::set_render_ids(
|
||||
int render_process_id, int render_view_id) {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
render_process_id_ = render_process_id;
|
||||
render_view_id_ = render_view_id;
|
||||
}
|
||||
|
||||
bool CefBrowserInfo::is_render_id_match(
|
||||
int render_process_id, int render_view_id) {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
if (render_process_id != render_process_id_)
|
||||
return false;
|
||||
return (render_view_id == 0 || render_view_id == render_view_id_);
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> CefBrowserInfo::browser() {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
return browser_;
|
||||
}
|
||||
|
||||
void CefBrowserInfo::set_browser(CefRefPtr<CefBrowserHostImpl> browser) {
|
||||
base::AutoLock lock_scope(lock_);
|
||||
browser_ = browser;
|
||||
}
|
Reference in New Issue
Block a user