Fix cpplint errors

This commit is contained in:
Ryohei Ikegami 2017-04-12 12:25:56 +09:00
parent b07c3adca9
commit b19c5154ca
3 changed files with 15 additions and 6 deletions

View file

@ -106,10 +106,10 @@ bool AtomBrowserClient::ShouldCreateNewSiteInstance(
auto web_contents =
content::WebContents::FromRenderFrameHost(render_frame_host);
if (!ChildWebContentsTracker::IsChildWebContents(web_contents)) {
// Root WebContents should always create new process
// to make sure native addons are loaded correctly after reload / navigation.
// (Non-root WebContents opened by window.open() should try to reuse process
// to allow synchronous cross-window scripting.)
// Root WebContents should always create new process to make sure
// native addons are loaded correctly after reload / navigation.
// (Non-root WebContents opened by window.open() should try to
// reuse process to allow synchronous cross-window scripting.)
return true;
}
}

View file

@ -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>
namespace atom {

View file

@ -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_
#define ATOM_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
@ -9,7 +13,7 @@ namespace atom {
// created by native `window.open()`
class ChildWebContentsTracker : public content::WebContentsObserver {
public:
ChildWebContentsTracker(content::WebContents* web_contents);
explicit ChildWebContentsTracker(content::WebContents* web_contents);
static bool IsChildWebContents(content::WebContents* web_contents);
protected: