Index: chrome/renderer/extensions/extension_helper.cc |
=================================================================== |
--- chrome/renderer/extensions/extension_helper.cc (revision 191609) |
+++ chrome/renderer/extensions/extension_helper.cc (working copy) |
@@ -15,7 +15,6 @@ |
#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/console.h" |
#include "chrome/renderer/extensions/dispatcher.h" |
@@ -67,7 +66,7 @@ |
public: |
ViewAccumulator(const std::string& extension_id, |
int browser_window_id, |
- chrome::ViewType view_type) |
+ extensions::ViewType view_type) |
: extension_id_(extension_id), |
browser_window_id_(browser_window_id), |
view_type_(view_type) { |
@@ -95,19 +94,20 @@ |
views_.push_back(render_view); |
- if (view_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) |
+ if (view_type_ == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) |
Yoyo Zhou
2013/04/01 17:36:51
''
|
return false; // There can be only one... |
return true; |
} |
private: |
// Returns true if |type| "isa" |match|. |
- static bool ViewTypeMatches(chrome::ViewType type, chrome::ViewType match) { |
+ static bool ViewTypeMatches(extensions::ViewType type, |
+ extensions::ViewType match) { |
if (type == match) |
return true; |
// INVALID means match all. |
- if (match == chrome::VIEW_TYPE_INVALID) |
+ if (match == extensions::VIEW_TYPE_INVALID) |
return true; |
return false; |
@@ -115,7 +115,7 @@ |
std::string extension_id_; |
int browser_window_id_; |
- chrome::ViewType view_type_; |
+ extensions::ViewType view_type_; |
std::vector<content::RenderView*> views_; |
}; |
@@ -125,7 +125,7 @@ |
std::vector<content::RenderView*> ExtensionHelper::GetExtensionViews( |
const std::string& extension_id, |
int browser_window_id, |
- chrome::ViewType view_type) { |
+ extensions::ViewType view_type) { |
ViewAccumulator accumulator(extension_id, browser_window_id, view_type); |
content::RenderView::ForEach(&accumulator); |
return accumulator.views(); |
@@ -135,7 +135,7 @@ |
content::RenderView* ExtensionHelper::GetBackgroundPage( |
const std::string& extension_id) { |
ViewAccumulator accumulator(extension_id, extension_misc::kUnknownWindowId, |
- chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); |
+ extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); |
content::RenderView::ForEach(&accumulator); |
CHECK_LE(accumulator.views().size(), 1u); |
if (accumulator.views().size() == 0) |
@@ -149,7 +149,7 @@ |
content::RenderViewObserverTracker<ExtensionHelper>(render_view), |
dispatcher_(dispatcher), |
pending_app_icon_requests_(0), |
- view_type_(chrome::VIEW_TYPE_INVALID), |
+ view_type_(extensions::VIEW_TYPE_INVALID), |
tab_id_(-1), |
browser_window_id_(-1) { |
} |
@@ -349,7 +349,7 @@ |
routing_id(), page_id, app_info)); |
} |
-void ExtensionHelper::OnNotifyRendererViewType(chrome::ViewType type) { |
+void ExtensionHelper::OnNotifyRendererViewType(extensions::ViewType type) { |
view_type_ = type; |
} |