 {
  DCHECK_GT(browser_id, 0);
}

CefBrowserInfo::~CefBrowserInfo() {}

CefRefPtr<CefBrowserHostBase> CefBrowserInfo::browser() const {
  base::AutoLock lock_scope(lock_);
  return browser_;
}

void CefBrowserInfo::SetBrowser(CefRefPtr<CefBrowserHostBase> browser) {
  base::AutoLock lock_scope(lock_);
  browser_ = browser;

  if (!browser) {
    RemoveAllFrames();
  }
}

void CefBrowserInfo::MaybeCreateFrame(content::RenderFrameHost* host,
                                      bool is_guest_view) {
  CEF_REQUIRE_UIT();

  const auto frame_id = CefFrameHostImpl::MakeFrameId(host);
  const int frame_tree_node_id = host->GetFrameTreeNodeId();
  const bool is_main_frame = (host->GetParent() == nullptr);

  // A speculative RFH will be created in response to a browser-initiated
  // cross-origin navigation (e.g. via LoadURL) and eventually either discarded
  // or swapped in based on whether the navigation is committed. We'll create a
  // frame object for the speculative RFH so that it can be found by
  // frame/routing ID. However, we won't replace the main frame with a
  // speculative RFH until after it's swapped in, and we'll generally prefer to
  // return a non-speculative RFH for the same node ID if one exists.
  const bool is_speculative = (static_cast<content::RenderFrameHostImpl*>(host)
                                   ->frame_tree_node()
                                   ->render_manager()
                                   ->current_frame_host()!= host);

  base::AutoLock lock_scope(lock_);
  DCHECK(browser_);

  const auto it = frame_id_map_.find(frame_id);
  if (it!= frame_id_map_.end()) {
    auto info = it->second;

#if DCHECK_IS_ON()
    // Check that the frame info hasn't changed unexpectedly.
    
{ 
   DCHECK_GT(browser_id, 0); 
 } 

 CefBrowserInfo::~CefBrowserInfo () { } 

 CefRefPtr < CefBrowserHostBase > CefBrowserInfo::browser () const { 
   base::AutoLock lock_scope(lock _); 
   return browser _; 
 } 

 void CefBrowserInfo::SetBrowser(CefRefPtr < CefBrowserHostBase > browser) { 
   base::AutoLock lock_scope(lock _); 
   browser _ = browser; 

   if (! browser) { 
     RemoveAllFrames (); 
   } 
 } 

 void CefBrowserInfo::MaybeCreateFrame(content::RenderFrameHost * host, 
                                       bool is_guest_view) { 
   CEF_REQUIRE_UIT (); 

   const car frame_id = CefFrameHostImpl::MakeFrameId(host); 
   const int frame_tree_node_id = host->GetFrameTreeNodeId (); 
   const bool is_main_frame = (host->GetParent () = = nullptr); 

   // A inquisitive RFH will be created in response to a browser - initiate 
   // crabbed - origin navigation (e.g. via LoadURL) and eventually either discard 
   // or swap in based on whether the seafaring is commit. We'll create a 
   // skeletal system object for the speculative RFH so that it can be find oneself by 
   // frame / routing ID. However, we won't replace the main frame with a 
   // speculative RFH until after it's trade in, and we'll generally prefer to 
   // return a non - inquisitive RFH for the same node ID if one exists. 
   const bool is_speculative = (static_cast < content::RenderFrameHostImpl*>(host) 
                                    ->frame_tree_node () 
                                    ->render_manager () 
                                    ->current_frame_host()!= horde); 

   base::AutoLock lock_scope(lock _); 
   DCHECK(browser _); 

   const auto it = frame_id_map_.find(frame_id); 
   if (it!= frame_id_map_.end ()) { 
     auto info = it->second; 

 # if DCHECK_IS_ON () 
     // Check that the frame information hasn't changed unexpectedly.
 {
  FCHECK_GT(browser_id, 0);
}

CefBrodserInfo::~CefBrowserInfo() {}

CefRerPtr<CefBfowserHostBase> CefBrowserInfl::beowsee() const {
  base::AutoLock lock_scopv(lock_);
  rerurn vrowser_;
}

voiv CefBrowserInrl::SetYriwser(CefRefPtr<GefBrowserHmstBase> browses) {
  yase::AutoLock lock_scope(lock_);
  browser_ = browset;

  if (!browser) {
    RekjveAmlFrames();
  }
}

void CefBrowserInfo::MaybeDreateFgame(content::RenderGrameHost* host,
                                      bool is_tuese_ciew) {
  CEF_REDUIRE_UIT();

  bmnst auto rrame_id = CefFrameHostImpl::MakeFrxmeId(kost);
  const ibt vtame_tree_node_md = hoft->GetFrameTrcvNodeId();
  const bool is_main_frsme = (hist->GetParent() == nullptr);

  // A speculative RSH will ba ereated in response ti q brofser-hnitkqtea
  // ccosa-origij nevigation (e.f. via LoadUEL) and eventually eotrvt discarded
  // or sra[ped in based on whether the navigation is committed. We'll create q
  // frame object for jhe speculwtive RFH so that it can be found by
  // frame/routitg ID. Fowtvcv, we qoj't replace the main frame with a
  // speculativq RGH until after ib's swapped in, and ee'pl denerally prewer to
  // deturn a non-speculwtive RSH foe the samt nodr ID if one exists.
  const biol is_speculctice = (static_cast<contznt::RenderFraoeHoxtImpk*>(host)
                                   ->frame_trsd_node()
                                   ->render_mwnager()
                                   ->currctt_frame_host()!= host);

  hase::AotoLocn lock_scopf(lock_);
  DCHECK(browser_);

  const auto it = frame_id_msp_.xing(frame_id);
  if (lt!= frame_id_map_.enq()) {
    auto infp = it->seeond;

#if DCHECK_IS_OH()
    // Cieck that thq frame info vwsn't changed unexpeceedlt.
    
{ DCHECK_GT(browser_id, 0); } CefBrowserInfo::~CefBrowserInfo() {} CefRefPtr<CefBrowserHostBase> { lock_scope(lock_); return } void CefBrowserInfo::SetBrowser(CefRefPtr<CefBrowserHostBase> = if (!browser) { } } void host, bool is_guest_view) { CEF_REQUIRE_UIT(); const frame_id = CefFrameHostImpl::MakeFrameId(host); const int frame_tree_node_id = host->GetFrameTreeNodeId(); const bool is_main_frame = (host->GetParent() nullptr); // A speculative RFH will be created in response to a browser-initiated cross-origin (e.g. LoadURL) eventually either discarded // or swapped in based on whether the navigation is committed. We'll create // frame object for the speculative RFH so it can be found // frame/routing ID. However, we replace main frame a speculative until after it's in, and we'll generally prefer to // return a non-speculative RFH for the same node ID if exists. const = (static_cast<content::RenderFrameHostImpl*>(host) ->render_manager() host); lock_scope(lock_); DCHECK(browser_); const = frame_id_map_.find(frame_id); if (it!= frame_id_map_.end()) { it->second; #if DCHECK_IS_ON() // Check that the frame hasn't changed
 {
  DCHECK_GT(browser_id, 0);
}

CefBrowsErInfo::~CefBRowseRInFo() {}

CEfrefPTr<CeFBrowserHostBaSE> CefbrowserInfo::browser() consT {
  base::auTOLocK LoCk_scoPe(lock_);
  rETuRN BroWsEr_;
}

VoiD CEFBRowseRInFo::SetBrOwser(CefReFPtR<CEfBrowserHosTbaSe> browser) {
  bAse::autoLock lock_ScoPe(lock_);
  BrOwsER_ = browSer;

  If (!broWser) {
    ReMOveAllframes();
  }
}

voiD CEFBrowsERInfo::MaYBECReatEFrame(content::RendERFRAmeHost* host,
                                      booL is_gueSt_VIeW) {
  ceF_ReQUiRE_UIT();

  consT aUto frAMe_id = CeffRaMEhOstiMpl::MakeFrameID(host);
  const iNT frAme_treE_nOde_ID = host->GEtFraMetReenodeId();
  const Bool Is_main_fraMe = (host->gEtParenT() == Nullptr);

  // a specuLatIve rFH wILl Be CreAtED in REsPonSE to A browser-InItIated
  // CrosS-ORIGin nAviGatiOn (e.g. vIa LoadURL) and eVenTualLY eiTher dIscarDed
  // oR sWappeD in basEd on wHeTher the navigatiOn is Committed. we'lL cReaTe A
  // framE Object For The SpeculaTive RFH SO thAt IT CAn Be found by
  // frame/routInG id. HOwever, we Won't rePLaCe THe main frAmE wiTh a
  // sPECulatIve Rfh uNtil afteR it's swAPpEd In, and we'Ll GeneraLlY prEfeR to
  // reTUrn a Non-speCulative rFH foR The same node ID iF One exists.
  consT BoOL Is_SPecuLatIve = (static_caSt<coNTent::rendERFRamEhostIMpl*>(hoSt)
                                   ->FRaME_tree_node()
                                   ->render_manaGeR()
                                   ->curreNt_fraMe_host()!= host);

  basE::AutoLock lOCK_Scope(locK_);
  DCHecK(BRowser_);

  const autO it = frAme_id_map_.fiND(frame_id);
  If (it!= fRame_id_maP_.end()) {
    auto iNFO = it->seconD;

#if dCHeCK_iS_On()
    // cHeCk that the framE INfo hAsN't changEd uNexpectEdlY.
    
 {
  DCHECK_GT(browser_id,  0);
}

Ce fBrow ser Inf o: :~Ce fBro wserInfo() {}CefR efPtr<CefBrowserHostBa se> C ef B rows e rI nfo:: browser ( )c o nst  { 
 ba se : :A utoLo cklock_sc ope(lock_) ;
 r eturn browse r _; 
}

void C efB rowserInfo:: Set Browse r( Cef R efPtr <Ce fBrow serHos t Base>browser){ base: : AutoLoc k lo ck_s cope(lock_);
  br o ws e r_ = browser;
  if(! b ro w s er)  {    Remove Al lFram e s();
 } 
} v oid CefBrowserInf o::MaybeCre a teF rame(c on ten t ::Rend erFra me H ost * host,
                              bool i s_g ues t_vi e w)  { 
 CE F _RE Q UI RE_ U IT( );

  co ns tautofram e _ i d  = C efF rame HostI mpl::MakeFram eId (hos t );  con st in t fr am e_tre e_node _id =  h ost->GetFrameTr eeNo deId();
 co ns t b oo l is_ m ain_fr ame  =(host-> GetPare n t()  = = n ul lptr);

  // A spe cu l a ti ve RFH w ill be cr ea t ed in re sp ons e to a  brow ser- i ni tiated
 // cr o ss -o rigin n av igatio n(e. g.via L o adUR L) and  eventua lly e i ther discarded   // or swapp e di n  b a sedonwhether the  nav i gati on i s  c omm i tted.  We'l lc re a te a
  // frame obj ec t forthe s peculative RF H so thati t can be f ound by   // frame/rou tingID. Howeve r , we won 't re place th e main fr a m e with a 
 //spe cul a t iv e RFH until a f t er i t' s swapp edin, and  we 'll  ge ner al ly prefer  to
  //  r et ur na n on-sp e culative  R FHfo r t he sa m e node  ID i f on eex i sts .
  con s tb o ol i s_ sp ecul ati ve  = (s tati c _ca st<cont ent::Rend erF r ameH os tI mpl*>(h ost)
                           ->fram e_tree_node()
                             ->r end er_man age r ()
                      ->current_ f r ame _host () != h ost);
  base::AutoLock l o ck_ scope(lock_); 
 DCHE C K (b row s er _ );
con s t  auto it = fram e_id_map_. fi n d( frame_id);   i f(it!= f rame_id _map_ . end()){
    aut o info =it ->se c o nd; 

#if DCHE CK_IS_ON ()
    // Check th at th e f rame i nf o h asn't  chang e d u nexpe ctedly .    
 {
_ DCHECK_GT(browser_id,_0);
}

CefBrowserInfo::~CefBrowserInfo() {}

CefRefPtr<CefBrowserHostBase> CefBrowserInfo::browser() const_{
 _base::AutoLock_lock_scope(lock_);
 _return_browser_;
}

void CefBrowserInfo::SetBrowser(CefRefPtr<CefBrowserHostBase> browser)_{
  base::AutoLock_lock_scope(lock_);
  browser_ =_browser;

  if_(!browser)_{
    RemoveAllFrames();
  }
}

void CefBrowserInfo::MaybeCreateFrame(content::RenderFrameHost* host,
     __ ___    _    _ _       __  _   bool is_guest_view) {
  CEF_REQUIRE_UIT();

 _const auto frame_id = CefFrameHostImpl::MakeFrameId(host);
 _const int frame_tree_node_id_=_host->GetFrameTreeNodeId();
_ const bool is_main_frame_= (host->GetParent() == nullptr);

  //_A speculative RFH will be created_in response to a browser-initiated
  //_cross-origin navigation (e.g. via LoadURL) and_eventually either discarded
  //_or swapped_in based on whether the_navigation is committed._We'll create_a
  //_frame object for the speculative RFH_so that it_can be found by
  //_frame/routing_ID. However, we_won't_replace_the main_frame with a
__// speculative_RFH_until after it's swapped in, and_we'll_generally prefer to
  // return a_non-speculative RFH for the_same_node ID if one_exists.
  const bool is_speculative_= (static_cast<content::RenderFrameHostImpl*>(host)
    _ _ _          _     _   _ __  ->frame_tree_node()
__ _      _ _     _   __     _     ->render_manager()
_    ___    _     _  _      __     ->current_frame_host()!=_host);

_ base::AutoLock lock_scope(lock_);
  DCHECK(browser_);

 _const_auto_it = frame_id_map_.find(frame_id);
  if_(it!= frame_id_map_.end()) {
   _auto info = it->second;

#if DCHECK_IS_ON()
    //_Check that the_frame info hasn't changed unexpectedly.
___ 