Add WebContentsPrefrences class
This commit is contained in:
parent
81d423c547
commit
dd871812b7
5 changed files with 69 additions and 5 deletions
25
atom/browser/web_contents_preferences.cc
Normal file
25
atom/browser/web_contents_preferences.cc
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "atom/browser/web_contents_preferences.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace {
|
||||
|
||||
const char* kWebPreferencesKey = "WebContentsPreferences";
|
||||
|
||||
} // namespace
|
||||
|
||||
WebContentsPreferences::WebContentsPreferences(
|
||||
content::WebContents* web_contents,
|
||||
base::DictionaryValue&& web_preferences) {
|
||||
web_preferences_.Swap(&web_preferences);
|
||||
web_contents->SetUserData(kWebPreferencesKey, this);
|
||||
}
|
||||
|
||||
WebContentsPreferences::~WebContentsPreferences() {
|
||||
}
|
||||
|
||||
} // namespace atom
|
Loading…
Add table
Add a link
Reference in a new issue