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

Side by Side Diff: chrome/renderer/extensions/extension_custom_bindings.cc

Issue 10387110: Remove VIEW_TYPE_WEB_CONTENTS and make default view type INVALID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_view_type.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/extensions/extension_custom_bindings.h" 5 #include "chrome/renderer/extensions/extension_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/common/chrome_view_type.h" 10 #include "chrome/common/chrome_view_type.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // |view_type| == content::VIEW_TYPE_INVALID means getting any type of 51 // |view_type| == content::VIEW_TYPE_INVALID means getting any type of
52 // views. 52 // views.
53 content::ViewType view_type = content::VIEW_TYPE_INVALID; 53 content::ViewType view_type = content::VIEW_TYPE_INVALID;
54 if (view_type_string == chrome::kViewTypeBackgroundPage) { 54 if (view_type_string == chrome::kViewTypeBackgroundPage) {
55 view_type = chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; 55 view_type = chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE;
56 } else if (view_type_string == chrome::kViewTypeInfobar) { 56 } else if (view_type_string == chrome::kViewTypeInfobar) {
57 view_type = chrome::VIEW_TYPE_EXTENSION_INFOBAR; 57 view_type = chrome::VIEW_TYPE_EXTENSION_INFOBAR;
58 } else if (view_type_string == chrome::kViewTypeNotification) { 58 } else if (view_type_string == chrome::kViewTypeNotification) {
59 view_type = chrome::VIEW_TYPE_NOTIFICATION; 59 view_type = chrome::VIEW_TYPE_NOTIFICATION;
60 } else if (view_type_string == chrome::kViewTypeTabContents) { 60 } else if (view_type_string == chrome::kViewTypeTabContents) {
61 view_type = content::VIEW_TYPE_WEB_CONTENTS; 61 view_type = chrome::VIEW_TYPE_TAB_CONTENTS;
62 } else if (view_type_string == chrome::kViewTypePopup) { 62 } else if (view_type_string == chrome::kViewTypePopup) {
63 view_type = chrome::VIEW_TYPE_EXTENSION_POPUP; 63 view_type = chrome::VIEW_TYPE_EXTENSION_POPUP;
64 } else if (view_type_string == chrome::kViewTypeExtensionDialog) { 64 } else if (view_type_string == chrome::kViewTypeExtensionDialog) {
65 view_type = chrome::VIEW_TYPE_EXTENSION_DIALOG; 65 view_type = chrome::VIEW_TYPE_EXTENSION_DIALOG;
66 } else if (view_type_string == chrome::kViewTypeAppShell) { 66 } else if (view_type_string == chrome::kViewTypeAppShell) {
67 view_type = chrome::VIEW_TYPE_APP_SHELL; 67 view_type = chrome::VIEW_TYPE_APP_SHELL;
68 } else if (view_type_string == chrome::kViewTypePanel) { 68 } else if (view_type_string == chrome::kViewTypePanel) {
69 view_type = chrome::VIEW_TYPE_PANEL; 69 view_type = chrome::VIEW_TYPE_PANEL;
70 } else if (view_type_string != chrome::kViewTypeAll) { 70 } else if (view_type_string != chrome::kViewTypeAll) {
71 return v8::Undefined(); 71 return v8::Undefined();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 renderview->Send(new ExtensionHostMsg_OpenChannelToExtension( 117 renderview->Send(new ExtensionHostMsg_OpenChannelToExtension(
118 renderview->GetRoutingID(), 118 renderview->GetRoutingID(),
119 source_id, 119 source_id,
120 target_id, 120 target_id,
121 channel_name, 121 channel_name,
122 &port_id)); 122 &port_id));
123 return v8::Integer::New(port_id); 123 return v8::Integer::New(port_id);
124 } 124 }
125 125
126 } // namespace extensions 126 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/chrome_view_type.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698