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

Side by Side Diff: extensions/renderer/runtime_custom_bindings.cc

Issue 923463003: [Extensions] Remove the Infobar API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « extensions/common/view_type.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/renderer/runtime_custom_bindings.h" 5 #include "extensions/renderer/runtime_custom_bindings.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "content/public/child/v8_value_converter.h" 10 #include "content/public/child/v8_value_converter.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // all views for the current extension. 128 // all views for the current extension.
129 int browser_window_id = args[0]->Int32Value(); 129 int browser_window_id = args[0]->Int32Value();
130 130
131 std::string view_type_string = *v8::String::Utf8Value(args[1]); 131 std::string view_type_string = *v8::String::Utf8Value(args[1]);
132 StringToUpperASCII(&view_type_string); 132 StringToUpperASCII(&view_type_string);
133 // |view_type| == VIEW_TYPE_INVALID means getting any type of 133 // |view_type| == VIEW_TYPE_INVALID means getting any type of
134 // views. 134 // views.
135 ViewType view_type = VIEW_TYPE_INVALID; 135 ViewType view_type = VIEW_TYPE_INVALID;
136 if (view_type_string == kViewTypeBackgroundPage) { 136 if (view_type_string == kViewTypeBackgroundPage) {
137 view_type = VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; 137 view_type = VIEW_TYPE_EXTENSION_BACKGROUND_PAGE;
138 } else if (view_type_string == kViewTypeInfobar) {
139 view_type = VIEW_TYPE_EXTENSION_INFOBAR;
140 } else if (view_type_string == kViewTypeTabContents) { 138 } else if (view_type_string == kViewTypeTabContents) {
141 view_type = VIEW_TYPE_TAB_CONTENTS; 139 view_type = VIEW_TYPE_TAB_CONTENTS;
142 } else if (view_type_string == kViewTypePopup) { 140 } else if (view_type_string == kViewTypePopup) {
143 view_type = VIEW_TYPE_EXTENSION_POPUP; 141 view_type = VIEW_TYPE_EXTENSION_POPUP;
144 } else if (view_type_string == kViewTypeExtensionDialog) { 142 } else if (view_type_string == kViewTypeExtensionDialog) {
145 view_type = VIEW_TYPE_EXTENSION_DIALOG; 143 view_type = VIEW_TYPE_EXTENSION_DIALOG;
146 } else if (view_type_string == kViewTypeAppWindow) { 144 } else if (view_type_string == kViewTypeAppWindow) {
147 view_type = VIEW_TYPE_APP_WINDOW; 145 view_type = VIEW_TYPE_APP_WINDOW;
148 } else if (view_type_string == kViewTypeLauncherPage) { 146 } else if (view_type_string == kViewTypeLauncherPage) {
149 view_type = VIEW_TYPE_LAUNCHER_PAGE; 147 view_type = VIEW_TYPE_LAUNCHER_PAGE;
(...skipping 18 matching lines...) Expand all
168 v8::Local<v8::Value> window = context->Global(); 166 v8::Local<v8::Value> window = context->Global();
169 DCHECK(!window.IsEmpty()); 167 DCHECK(!window.IsEmpty());
170 v8_views->Set(v8::Integer::New(args.GetIsolate(), v8_index++), window); 168 v8_views->Set(v8::Integer::New(args.GetIsolate(), v8_index++), window);
171 } 169 }
172 } 170 }
173 171
174 args.GetReturnValue().Set(v8_views); 172 args.GetReturnValue().Set(v8_views);
175 } 173 }
176 174
177 } // namespace extensions 175 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/view_type.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698