Chromium Code Reviews| Index: chrome/renderer/extensions/extension_custom_bindings.cc |
| =================================================================== |
| --- chrome/renderer/extensions/extension_custom_bindings.cc (revision 191609) |
| +++ chrome/renderer/extensions/extension_custom_bindings.cc (working copy) |
| @@ -10,11 +10,11 @@ |
| #include "base/string_util.h" |
| #include "chrome/common/extensions/extension.h" |
| #include "chrome/common/url_constants.h" |
| -#include "chrome/common/view_type.h" |
| #include "chrome/renderer/extensions/dispatcher.h" |
| #include "chrome/renderer/extensions/extension_helper.h" |
| #include "content/public/renderer/render_view.h" |
| #include "content/public/renderer/v8_value_converter.h" |
| +#include "extensions/common/view_type.h" |
| #include "grit/renderer_resources.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| @@ -50,26 +50,26 @@ |
| std::string view_type_string = *v8::String::Utf8Value(args[1]->ToString()); |
| StringToUpperASCII(&view_type_string); |
| - // |view_type| == chrome::VIEW_TYPE_INVALID means getting any type of |
| + // |view_type| == extensions::VIEW_TYPE_INVALID means getting any type of |
|
Yoyo Zhou
2013/04/01 17:36:51
''
|
| // views. |
| - chrome::ViewType view_type = chrome::VIEW_TYPE_INVALID; |
| - if (view_type_string == chrome::kViewTypeBackgroundPage) { |
| - view_type = chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; |
| - } else if (view_type_string == chrome::kViewTypeInfobar) { |
| - view_type = chrome::VIEW_TYPE_EXTENSION_INFOBAR; |
| - } else if (view_type_string == chrome::kViewTypeNotification) { |
| - view_type = chrome::VIEW_TYPE_NOTIFICATION; |
| - } else if (view_type_string == chrome::kViewTypeTabContents) { |
| - view_type = chrome::VIEW_TYPE_TAB_CONTENTS; |
| - } else if (view_type_string == chrome::kViewTypePopup) { |
| - view_type = chrome::VIEW_TYPE_EXTENSION_POPUP; |
| - } else if (view_type_string == chrome::kViewTypeExtensionDialog) { |
| - view_type = chrome::VIEW_TYPE_EXTENSION_DIALOG; |
| - } else if (view_type_string == chrome::kViewTypeAppShell) { |
| - view_type = chrome::VIEW_TYPE_APP_SHELL; |
| - } else if (view_type_string == chrome::kViewTypePanel) { |
| - view_type = chrome::VIEW_TYPE_PANEL; |
| - } else if (view_type_string != chrome::kViewTypeAll) { |
| + extensions::ViewType view_type = extensions::VIEW_TYPE_INVALID; |
| + if (view_type_string == extensions::kViewTypeBackgroundPage) { |
| + view_type = extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; |
| + } else if (view_type_string == extensions::kViewTypeInfobar) { |
| + view_type = extensions::VIEW_TYPE_EXTENSION_INFOBAR; |
| + } else if (view_type_string == extensions::kViewTypeNotification) { |
| + view_type = extensions::VIEW_TYPE_NOTIFICATION; |
| + } else if (view_type_string == extensions::kViewTypeTabContents) { |
| + view_type = extensions::VIEW_TYPE_TAB_CONTENTS; |
| + } else if (view_type_string == extensions::kViewTypePopup) { |
| + view_type = extensions::VIEW_TYPE_EXTENSION_POPUP; |
| + } else if (view_type_string == extensions::kViewTypeExtensionDialog) { |
| + view_type = extensions::VIEW_TYPE_EXTENSION_DIALOG; |
| + } else if (view_type_string == extensions::kViewTypeAppShell) { |
| + view_type = extensions::VIEW_TYPE_APP_SHELL; |
| + } else if (view_type_string == extensions::kViewTypePanel) { |
| + view_type = extensions::VIEW_TYPE_PANEL; |
| + } else if (view_type_string != extensions::kViewTypeAll) { |
| return v8::Undefined(); |
| } |