Fix cpplint errors
This commit is contained in:
		
					parent
					
						
							
								b07c3adca9
							
						
					
				
			
			
				commit
				
					
						b19c5154ca
					
				
			
		
					 3 changed files with 15 additions and 6 deletions
				
			
		| 
						 | 
					@ -106,10 +106,10 @@ bool AtomBrowserClient::ShouldCreateNewSiteInstance(
 | 
				
			||||||
    auto web_contents =
 | 
					    auto web_contents =
 | 
				
			||||||
        content::WebContents::FromRenderFrameHost(render_frame_host);
 | 
					        content::WebContents::FromRenderFrameHost(render_frame_host);
 | 
				
			||||||
    if (!ChildWebContentsTracker::IsChildWebContents(web_contents)) {
 | 
					    if (!ChildWebContentsTracker::IsChildWebContents(web_contents)) {
 | 
				
			||||||
      // Root WebContents should always create new process
 | 
					      // Root WebContents should always create new process to make sure
 | 
				
			||||||
      // to make sure native addons are loaded correctly after reload / navigation.
 | 
					      // native addons are loaded correctly after reload / navigation.
 | 
				
			||||||
      // (Non-root WebContents opened by window.open() should try to reuse process
 | 
					      // (Non-root WebContents opened by window.open() should try to
 | 
				
			||||||
      //  to allow synchronous cross-window scripting.)
 | 
					      //  reuse process to allow synchronous cross-window scripting.)
 | 
				
			||||||
      return true;
 | 
					      return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,9 @@
 | 
				
			||||||
#include "child_web_contents_tracker.h"
 | 
					// Copyright (c) 2017 GitHub, Inc.
 | 
				
			||||||
 | 
					// Use of this source code is governed by the MIT license that can be
 | 
				
			||||||
 | 
					// found in the LICENSE file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "atom/browser/child_web_contents_tracker.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <unordered_set>
 | 
					#include <unordered_set>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace atom {
 | 
					namespace atom {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,7 @@
 | 
				
			||||||
 | 
					// Copyright (c) 2017 GitHub, Inc.
 | 
				
			||||||
 | 
					// Use of this source code is governed by the MIT license that can be
 | 
				
			||||||
 | 
					// found in the LICENSE file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef ATOM_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
 | 
					#ifndef ATOM_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
 | 
				
			||||||
#define ATOM_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
 | 
					#define ATOM_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,7 +13,7 @@ namespace atom {
 | 
				
			||||||
// created by native `window.open()`
 | 
					// created by native `window.open()`
 | 
				
			||||||
class ChildWebContentsTracker : public content::WebContentsObserver {
 | 
					class ChildWebContentsTracker : public content::WebContentsObserver {
 | 
				
			||||||
 public:
 | 
					 public:
 | 
				
			||||||
  ChildWebContentsTracker(content::WebContents* web_contents);
 | 
					  explicit ChildWebContentsTracker(content::WebContents* web_contents);
 | 
				
			||||||
  static bool IsChildWebContents(content::WebContents* web_contents);
 | 
					  static bool IsChildWebContents(content::WebContents* web_contents);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 protected:
 | 
					 protected:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue