From 785eb9657b32c08f4f4ddd5a33cb006854ff4285 Mon Sep 17 00:00:00 2001 From: Robo Date: Tue, 8 Sep 2015 05:24:07 +0530 Subject: [PATCH] remove unused code --- atom/browser/web_view_constants.cc | 24 ---------------------- atom/browser/web_view_constants.h | 27 ------------------------- atom/browser/web_view_guest_delegate.cc | 10 +++++++-- filenames.gypi | 2 -- 4 files changed, 8 insertions(+), 55 deletions(-) delete mode 100644 atom/browser/web_view_constants.cc delete mode 100644 atom/browser/web_view_constants.h diff --git a/atom/browser/web_view_constants.cc b/atom/browser/web_view_constants.cc deleted file mode 100644 index 6f8314cbcf36..000000000000 --- a/atom/browser/web_view_constants.cc +++ /dev/null @@ -1,24 +0,0 @@ -// 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_view_constants.h" - -namespace atom { - -namespace web_view { - -const char kPreloadUrl[] = "preloadUrl"; -const char kNodeIntegration[] = "nodeIntegration"; -const char kPlugins[] = "plugins"; -const char kDisableWebSecurity[] = "disableWebSecurity"; -const char kPartitionId[] = "partitionId"; - -const int kDefaultWidth = 300; -const int kDefaultHeight = 300; - -const char kWebViewInfoKeyName[] = "web_view_info"; - -} // namespace web_view - -} // namespace atom diff --git a/atom/browser/web_view_constants.h b/atom/browser/web_view_constants.h deleted file mode 100644 index 0831bdbdf1d4..000000000000 --- a/atom/browser/web_view_constants.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#ifndef ATOM_BROWSER_WEB_VIEW_CONSTANTS_H_ -#define ATOM_BROWSER_WEB_VIEW_CONSTANTS_H_ - -namespace atom { - -namespace web_view { - -extern const char kPreloadUrl[]; -extern const char kNodeIntegration[]; -extern const char kPlugins[]; -extern const char kDisableWebSecurity[]; -extern const char kPartitionId[]; - -extern const int kDefaultWidth; -extern const int kDefaultHeight; - -extern const char kWebViewInfoKeyName[]; - -} // namespace web_view - -} // namespace atom - -#endif // ATOM_BROWSER_WEB_VIEW_CONSTANTS_H_ diff --git a/atom/browser/web_view_guest_delegate.cc b/atom/browser/web_view_guest_delegate.cc index a954cea8dc02..8e1810c4a39b 100644 --- a/atom/browser/web_view_guest_delegate.cc +++ b/atom/browser/web_view_guest_delegate.cc @@ -5,7 +5,6 @@ #include "atom/browser/web_view_guest_delegate.h" #include "atom/browser/api/atom_api_web_contents.h" -#include "atom/browser/web_view_constants.h" #include "atom/common/native_mate_converters/gurl_converter.h" #include "content/public/browser/guest_host.h" #include "content/public/browser/render_frame_host.h" @@ -14,6 +13,13 @@ namespace atom { +namespace { + +const int kDefaultWidth = 300; +const int kDefaultHeight = 300; + +} // namespace + WebViewGuestDelegate::WebViewGuestDelegate() : guest_opaque_(true), guest_host_(nullptr), @@ -172,7 +178,7 @@ gfx::Size WebViewGuestDelegate::GetDefaultSize() const { return embedder_web_contents_->GetRenderWidgetHostView() ->GetVisibleViewportSize(); } else { - return gfx::Size(web_view::kDefaultWidth, web_view::kDefaultHeight); + return gfx::Size(kDefaultWidth, kDefaultHeight); } } diff --git a/filenames.gypi b/filenames.gypi index 78a8e17f2f99..461c812753c9 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -230,8 +230,6 @@ 'atom/browser/web_contents_preferences.h', 'atom/browser/web_dialog_helper.cc', 'atom/browser/web_dialog_helper.h', - 'atom/browser/web_view_constants.cc', - 'atom/browser/web_view_constants.h', 'atom/browser/web_view_guest_delegate.cc', 'atom/browser/web_view_guest_delegate.h', 'atom/browser/web_view_manager.cc',