| 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| == VIEW_TYPE_INVALID means getting any type of
|
| // 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) {
|
| + ViewType view_type = VIEW_TYPE_INVALID;
|
| + if (view_type_string == kViewTypeBackgroundPage) {
|
| + view_type = VIEW_TYPE_EXTENSION_BACKGROUND_PAGE;
|
| + } else if (view_type_string == kViewTypeInfobar) {
|
| + view_type = VIEW_TYPE_EXTENSION_INFOBAR;
|
| + } else if (view_type_string == kViewTypeNotification) {
|
| + view_type = VIEW_TYPE_NOTIFICATION;
|
| + } else if (view_type_string == kViewTypeTabContents) {
|
| + view_type = VIEW_TYPE_TAB_CONTENTS;
|
| + } else if (view_type_string == kViewTypePopup) {
|
| + view_type = VIEW_TYPE_EXTENSION_POPUP;
|
| + } else if (view_type_string == kViewTypeExtensionDialog) {
|
| + view_type = VIEW_TYPE_EXTENSION_DIALOG;
|
| + } else if (view_type_string == kViewTypeAppShell) {
|
| + view_type = VIEW_TYPE_APP_SHELL;
|
| + } else if (view_type_string == kViewTypePanel) {
|
| + view_type = VIEW_TYPE_PANEL;
|
| + } else if (view_type_string != kViewTypeAll) {
|
| return v8::Undefined();
|
| }
|
|
|
|
|