diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 19:43:09 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 19:43:09 +0000 |
commit | 1280270eea827aca9b676aced264a25a26efa36a (patch) | |
tree | 65063d97a0930022cc8bb5692810df9ab1305d7a /chrome/common | |
parent | 652727def58ab808755d4fe9930acdf783482596 (diff) | |
download | chromium_src-1280270eea827aca9b676aced264a25a26efa36a.zip chromium_src-1280270eea827aca9b676aced264a25a26efa36a.tar.gz chromium_src-1280270eea827aca9b676aced264a25a26efa36a.tar.bz2 |
Try to cut down Browser/TabContents header dependencies.
- Forward declare printing::PrintViewManager in TabContents
- tab_contents.h shouldn't depend on autocomplete_edit.h
- Pull logging out of Browser through PageTransitionTypes
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2934004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51995 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/extensions/extension.cc | 1 | ||||
-rw-r--r-- | chrome/common/extensions/extension.h | 2 | ||||
-rw-r--r-- | chrome/common/page_transition_types.cc | 14 | ||||
-rw-r--r-- | chrome/common/page_transition_types.h | 11 |
4 files changed, 17 insertions, 11 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index a164ea4..33a3b03 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -33,6 +33,7 @@ #include "chrome/common/url_constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "webkit/glue/image_decoder.h" #if defined(OS_WIN) diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index 5dc807f..fe7ac77 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -20,10 +20,10 @@ #include "gfx/size.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest_prod.h" -#include "third_party/skia/include/core/SkBitmap.h" class ExtensionAction; class ExtensionResource; +class SkBitmap; // Represents a Chrome extension. class Extension { diff --git a/chrome/common/page_transition_types.cc b/chrome/common/page_transition_types.cc index 9fb49cd..bf686f9 100644 --- a/chrome/common/page_transition_types.cc +++ b/chrome/common/page_transition_types.cc @@ -4,6 +4,20 @@ #include "chrome/common/page_transition_types.h" +#include "base/logging.h" + +// static +PageTransition::Type PageTransition::FromInt(int32 type) { + if (!ValidType(type)) { + NOTREACHED() << "Invalid transition type " << type; + + // Return a safe default so we don't have corrupt data in release mode. + return LINK; + } + return static_cast<Type>(type); +} + +// static const char* PageTransition::CoreTransitionString(Type type) { switch (type & PageTransition::CORE_MASK) { case 0: return "link"; diff --git a/chrome/common/page_transition_types.h b/chrome/common/page_transition_types.h index bb46006..592fc29 100644 --- a/chrome/common/page_transition_types.h +++ b/chrome/common/page_transition_types.h @@ -6,7 +6,6 @@ #define CHROME_COMMON_PAGE_TRANSITION_TYPES_H__ #include "base/basictypes.h" -#include "base/logging.h" // This class is for scoping only. class PageTransition { @@ -131,15 +130,7 @@ class PageTransition { return (t <= LAST_CORE); } - static Type FromInt(int32 type) { - if (!ValidType(type)) { - NOTREACHED() << "Invalid transition type " << type; - - // Return a safe default so we don't have corrupt data in release mode. - return LINK; - } - return static_cast<Type>(type); - } + static Type FromInt(int32 type); // Returns true if the given transition is a top-level frame transition, or // false if the transition was for a subframe. |