summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 18:40:01 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 18:40:01 +0000
commitcccd376dcdb2cc8855c7ca1fd649a948d68d6f08 (patch)
tree5b7dc1ac2b4ae5f67130558958d43eb72070425a /chrome/common
parentd344a107c64835954d494f2e4477c7326c31abd8 (diff)
downloadchromium_src-cccd376dcdb2cc8855c7ca1fd649a948d68d6f08.zip
chromium_src-cccd376dcdb2cc8855c7ca1fd649a948d68d6f08.tar.gz
chromium_src-cccd376dcdb2cc8855c7ca1fd649a948d68d6f08.tar.bz2
Part 3 of reapplying r64637.
This moves SecurityStyle and PageType into chrome/common/ and removes the chrome_frame dependency on chrome/browser/tab_contents/. This undoes the temporary DEPS hack on chrome/common/. BUG=51409 TEST=compiles Review URL: http://codereview.chromium.org/4697005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/DEPS9
-rw-r--r--chrome/common/automation_messages.h17
-rw-r--r--chrome/common/automation_messages_internal.h3
-rw-r--r--chrome/common/page_type.h17
-rw-r--r--chrome/common/security_style.h35
5 files changed, 62 insertions, 19 deletions
diff --git a/chrome/common/DEPS b/chrome/common/DEPS
index 26ce642..18175ac 100644
--- a/chrome/common/DEPS
+++ b/chrome/common/DEPS
@@ -17,15 +17,6 @@ include_rules = [
"+third_party/sqlite",
"+third_party/zlib",
- # TODO(erg): A previous version of this patch moved everything needed from
- # tab_contents/ to chrome/common/ but failed on the buildbot (but not locally
- # or on the trybots). Temporarily add this suppression as I commit what was a
- # very large patch piecewise, removing it with the final patch that will move
- # the files again and remove this override.
- #
- # (Also: the only thing used from these headers are enums.)
- "+chrome/browser/tab_contents",
-
# FIXME - refactor code and remove these dependencies
"+chrome/installer",
]
diff --git a/chrome/common/automation_messages.h b/chrome/common/automation_messages.h
index bc77704..0f8ec7c 100644
--- a/chrome/common/automation_messages.h
+++ b/chrome/common/automation_messages.h
@@ -11,8 +11,9 @@
#include "base/basictypes.h"
#include "chrome/common/automation_constants.h"
#include "chrome/common/common_param_traits.h"
-#include "chrome/browser/tab_contents/navigation_entry.h"
-#include "chrome/browser/tab_contents/security_style.h"
+#include "chrome/common/page_type.h"
+#include "chrome/common/security_style.h"
+#include "chrome/common/common_param_traits.h"
#include "gfx/rect.h"
#include "net/base/upload_data.h"
@@ -198,8 +199,8 @@ struct ParamTraits<SecurityStyle> {
};
template <>
-struct ParamTraits<NavigationEntry::PageType> {
- typedef NavigationEntry::PageType param_type;
+struct ParamTraits<PageType> {
+ typedef PageType param_type;
static void Write(Message* m, const param_type& p) {
m->WriteInt(p);
}
@@ -207,19 +208,19 @@ struct ParamTraits<NavigationEntry::PageType> {
int type;
if (!m->ReadInt(iter, &type))
return false;
- *p = static_cast<NavigationEntry::PageType>(type);
+ *p = static_cast<PageType>(type);
return true;
}
static void Log(const param_type& p, std::string* l) {
std::string control;
switch (p) {
- case NavigationEntry::NORMAL_PAGE:
+ case NORMAL_PAGE:
control = "NORMAL_PAGE";
break;
- case NavigationEntry::ERROR_PAGE:
+ case ERROR_PAGE:
control = "ERROR_PAGE";
break;
- case NavigationEntry::INTERSTITIAL_PAGE:
+ case INTERSTITIAL_PAGE:
control = "INTERSTITIAL_PAGE";
break;
default:
diff --git a/chrome/common/automation_messages_internal.h b/chrome/common/automation_messages_internal.h
index 97e0a20..15479f4 100644
--- a/chrome/common/automation_messages_internal.h
+++ b/chrome/common/automation_messages_internal.h
@@ -613,8 +613,7 @@ IPC_BEGIN_MESSAGES(Automation)
// Response:
// - bool: whether the operation was successful.
// - PageType: the type of the page currently displayed.
- IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetPageType, int, bool,
- NavigationEntry::PageType)
+ IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetPageType, int, bool, PageType)
// This message simulates the user action on the SSL blocking page showing in
// the specified tab. This message is only effective if an interstitial page
diff --git a/chrome/common/page_type.h b/chrome/common/page_type.h
new file mode 100644
index 0000000..2a2bd1a
--- /dev/null
+++ b/chrome/common/page_type.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_PAGE_TYPE_H_
+#define CHROME_COMMON_PAGE_TYPE_H_
+#pragma once
+
+// The type of the page an entry corresponds to. Used by chrome_frame and the
+// automation layer to detect the state of a TabContents.
+enum PageType {
+ NORMAL_PAGE = 0,
+ ERROR_PAGE,
+ INTERSTITIAL_PAGE
+};
+
+#endif // CHROME_COMMON_PAGE_TYPE_H_
diff --git a/chrome/common/security_style.h b/chrome/common/security_style.h
new file mode 100644
index 0000000..7d92d0e
--- /dev/null
+++ b/chrome/common/security_style.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_SECURITY_STYLE_H_
+#define CHROME_COMMON_SECURITY_STYLE_H_
+#pragma once
+
+// Various aspects of the UI change their appearance according to the security
+// context in which they are displayed. For example, the location bar displays
+// a lock icon when it is displayed during a valid SSL connection.
+// SecuirtySyle enumerates these styles, but it is up to the UI elements to
+// adjust their display appropriately.
+enum SecurityStyle {
+ // SECURITY_STYLE_UNKNOWN indicates that we do not know the proper security
+ // style for this object.
+ SECURITY_STYLE_UNKNOWN,
+
+ // SECURITY_STYLE_UNAUTHENTICATED means the authenticity of this object can
+ // not be determined, either because it was retrieved using an unauthenticated
+ // protocol, such as HTTP or FTP, or it was retrieved using a protocol that
+ // supports authentication, such as HTTPS, but there were errors during
+ // transmission that render us uncertain to the object's authenticity.
+ SECURITY_STYLE_UNAUTHENTICATED,
+
+ // SECURITY_STYLE_AUTHENTICATION_BROKEN indicates that we tried to retrieve
+ // this object in an authenticated manner but were unable to do so.
+ SECURITY_STYLE_AUTHENTICATION_BROKEN,
+
+ // SECURITY_STYLE_AUTHENTICATED indicates that we successfully retrieved this
+ // object over an authenticated protocol, such as HTTPS.
+ SECURITY_STYLE_AUTHENTICATED,
+};
+
+#endif // CHROME_COMMON_SECURITY_STYLE_H_