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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
index c9266a7c089f9448048080f5f4ec016abc2dbc7e..e9e90fad4c783284dfd003a0ac56dd6f3cfb7a0c 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
@@ -18,10 +18,10 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/common/page_transition_types.h"
#include "extensions/browser/event_router.h"
#include "extensions/common/event_filtering_info.h"
#include "net/base/net_errors.h"
+#include "ui/base/page_transition_types.h"
namespace extensions {
@@ -93,7 +93,7 @@ void DispatchOnCommitted(const std::string& event_name,
content::WebContents* web_contents,
content::RenderFrameHost* frame_host,
const GURL& url,
- content::PageTransition transition_type) {
+ ui::PageTransition transition_type) {
scoped_ptr<base::ListValue> args(new base::ListValue());
base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetInteger(keys::kTabIdKey, ExtensionTabUtil::GetTabId(web_contents));
@@ -101,21 +101,21 @@ void DispatchOnCommitted(const std::string& event_name,
dict->SetInteger(keys::kProcessIdKey, frame_host->GetProcess()->GetID());
dict->SetInteger(keys::kFrameIdKey, GetFrameId(frame_host));
std::string transition_type_string =
- content::PageTransitionGetCoreTransitionString(transition_type);
+ ui::PageTransitionGetCoreTransitionString(transition_type);
// For webNavigation API backward compatibility, keep "start_page" even after
// renamed to "auto_toplevel".
- if (PageTransitionStripQualifier(transition_type) ==
- content::PAGE_TRANSITION_AUTO_TOPLEVEL)
+ if (ui::PageTransitionStripQualifier(transition_type) ==
+ ui::PAGE_TRANSITION_AUTO_TOPLEVEL)
transition_type_string = "start_page";
dict->SetString(keys::kTransitionTypeKey, transition_type_string);
base::ListValue* qualifiers = new base::ListValue();
- if (transition_type & content::PAGE_TRANSITION_CLIENT_REDIRECT)
+ if (transition_type & ui::PAGE_TRANSITION_CLIENT_REDIRECT)
qualifiers->Append(new base::StringValue("client_redirect"));
- if (transition_type & content::PAGE_TRANSITION_SERVER_REDIRECT)
+ if (transition_type & ui::PAGE_TRANSITION_SERVER_REDIRECT)
qualifiers->Append(new base::StringValue("server_redirect"));
- if (transition_type & content::PAGE_TRANSITION_FORWARD_BACK)
+ if (transition_type & ui::PAGE_TRANSITION_FORWARD_BACK)
qualifiers->Append(new base::StringValue("forward_back"));
- if (transition_type & content::PAGE_TRANSITION_FROM_ADDRESS_BAR)
+ if (transition_type & ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)
qualifiers->Append(new base::StringValue("from_address_bar"));
dict->Set(keys::kTransitionQualifiersKey, qualifiers);
dict->SetDouble(keys::kTimeStampKey, MilliSecondsFromTime(base::Time::Now()));

Powered by Google App Engine
This is Rietveld 408576698