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

Unified Diff: chrome/renderer/extensions/extension_helper.cc

Issue 10409088: Get rid of the RenderViewType concept in content, since it was only used by Chrome. Store the enum… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 7 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/renderer/extensions/extension_helper.cc
===================================================================
--- chrome/renderer/extensions/extension_helper.cc (revision 138369)
+++ chrome/renderer/extensions/extension_helper.cc (working copy)
@@ -12,10 +12,10 @@
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/chrome_view_type.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
+#include "chrome/common/view_type.h"
#include "chrome/renderer/extensions/chrome_v8_context.h"
#include "chrome/renderer/extensions/extension_dispatcher.h"
#include "chrome/renderer/extensions/miscellaneous_bindings.h"
@@ -59,7 +59,7 @@
public:
ExtensionViewAccumulator(const std::string& extension_id,
int browser_window_id,
- content::ViewType view_type)
+ chrome::ViewType view_type)
: extension_id_(extension_id),
browser_window_id_(browser_window_id),
view_type_(view_type) {
@@ -94,12 +94,12 @@
private:
// Returns true if |type| "isa" |match|.
- static bool ViewTypeMatches(content::ViewType type, content::ViewType match) {
+ static bool ViewTypeMatches(chrome::ViewType type, chrome::ViewType match) {
if (type == match)
return true;
// INVALID means match all.
- if (match == content::VIEW_TYPE_INVALID)
+ if (match == chrome::VIEW_TYPE_INVALID)
return true;
return false;
@@ -107,7 +107,7 @@
std::string extension_id_;
int browser_window_id_;
- content::ViewType view_type_;
+ chrome::ViewType view_type_;
std::vector<content::RenderView*> views_;
};
@@ -117,7 +117,7 @@
std::vector<content::RenderView*> ExtensionHelper::GetExtensionViews(
const std::string& extension_id,
int browser_window_id,
- content::ViewType view_type) {
+ chrome::ViewType view_type) {
ExtensionViewAccumulator accumulator(
extension_id, browser_window_id, view_type);
content::RenderView::ForEach(&accumulator);
@@ -143,7 +143,7 @@
content::RenderViewObserverTracker<ExtensionHelper>(render_view),
extension_dispatcher_(extension_dispatcher),
pending_app_icon_requests_(0),
- view_type_(content::VIEW_TYPE_INVALID),
+ view_type_(chrome::VIEW_TYPE_INVALID),
browser_window_id_(-1) {
}
@@ -369,7 +369,7 @@
routing_id(), page_id, app_info));
}
-void ExtensionHelper::OnNotifyRendererViewType(content::ViewType type) {
+void ExtensionHelper::OnNotifyRendererViewType(chrome::ViewType type) {
view_type_ = type;
}

Powered by Google App Engine
This is Rietveld 408576698