Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1346)

Unified Diff: content/public/common/context_menu_params.cc

Issue 9382037: Move ContextMenuParams struct from webkit/glue to content/public/common. The reasons are: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/common/context_menu_params.cc
===================================================================
--- content/public/common/context_menu_params.cc (revision 121660)
+++ content/public/common/context_menu_params.cc (working copy)
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/context_menu.h"
+#include "content/public/common/context_menu_params.h"
+
+#include "content/common/ssl_status_serialization.h"
#include "webkit/glue/glue_serialize.h"
-namespace webkit_glue {
+namespace content {
const int32 CustomContextMenuContext::kCurrentRenderWidget = kint32max;
@@ -15,8 +17,6 @@
render_widget_id(kCurrentRenderWidget) {
}
-} // namespace webkit_glue
-
ContextMenuParams::ContextMenuParams()
: media_type(WebKit::WebContextMenuData::MediaTypeNone),
x(0),
@@ -31,6 +31,9 @@
referrer_policy(WebKit::WebReferrerPolicyDefault) {
}
+ContextMenuParams::~ContextMenuParams() {
+}
+
ContextMenuParams::ContextMenuParams(const WebKit::WebContextMenuData& data)
: media_type(data.mediaType),
x(data.mousePosition.x),
@@ -55,7 +58,6 @@
writing_direction_right_to_left(data.writingDirectionRightToLeft),
#endif // OS_MACOSX
edit_flags(data.editFlags),
- security_info(data.securityInfo),
frame_charset(data.frameEncoding.utf8()),
referrer_policy(data.referrerPolicy) {
for (size_t i = 0; i < data.dictionarySuggestions.size(); ++i)
@@ -69,7 +71,15 @@
frame_content_state =
webkit_glue::HistoryItemToString(data.frameHistoryItem);
}
+
+ // Deserialize the SSL info.
+ if (!data.securityInfo.isEmpty()) {
+ DeserializeSecurityInfo(data.securityInfo,
+ &security_info.cert_id,
+ &security_info.cert_status,
+ &security_info.security_bits,
+ &security_info.connection_status);
+ }
}
-ContextMenuParams::~ContextMenuParams() {
-}
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698