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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate_gtk.cc

Issue 200031: Take out the activex control. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 // This file was forked off the Mac port. 5 // This file was forked off the Mac port.
6 6
7 #include "webkit/tools/test_shell/test_webview_delegate.h" 7 #include "webkit/tools/test_shell/test_webview_delegate.h"
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 #include <gdk/gdkx.h> 10 #include <gdk/gdkx.h>
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 void TestWebViewDelegate::runModal() { 193 void TestWebViewDelegate::runModal() {
194 NOTIMPLEMENTED(); 194 NOTIMPLEMENTED();
195 } 195 }
196 196
197 // WebPluginPageDelegate ------------------------------------------------------ 197 // WebPluginPageDelegate ------------------------------------------------------
198 198
199 webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate( 199 webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
200 const GURL& url, 200 const GURL& url,
201 const std::string& mime_type, 201 const std::string& mime_type,
202 const std::string& clsid,
203 std::string* actual_mime_type) { 202 std::string* actual_mime_type) {
204 bool allow_wildcard = true; 203 bool allow_wildcard = true;
205 WebPluginInfo info; 204 WebPluginInfo info;
206 if (!NPAPI::PluginList::Singleton()->GetPluginInfo(url, mime_type, clsid, 205 if (!NPAPI::PluginList::Singleton()->GetPluginInfo(
207 allow_wildcard, &info, 206 url, mime_type, allow_wildcard, &info, actual_mime_type)) {
208 actual_mime_type))
209 return NULL; 207 return NULL;
208 }
210 209
211 const std::string& mtype = 210 const std::string& mtype =
212 (actual_mime_type && !actual_mime_type->empty()) ? *actual_mime_type 211 (actual_mime_type && !actual_mime_type->empty()) ? *actual_mime_type
213 : mime_type; 212 : mime_type;
214 // TODO(evanm): we probably shouldn't be doing this mapping to X ids at 213 // TODO(evanm): we probably shouldn't be doing this mapping to X ids at
215 // this level. 214 // this level.
216 GdkNativeWindow plugin_parent = 215 GdkNativeWindow plugin_parent =
217 GDK_WINDOW_XWINDOW(shell_->webViewHost()->view_handle()->window); 216 GDK_WINDOW_XWINDOW(shell_->webViewHost()->view_handle()->window);
218 217
219 return WebPluginDelegateImpl::Create(info.path, mtype, plugin_parent); 218 return WebPluginDelegateImpl::Create(info.path, mtype, plugin_parent);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Private methods ------------------------------------------------------------ 262 // Private methods ------------------------------------------------------------
264 263
265 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { 264 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) {
266 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()), 265 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()),
267 ("Test Shell - " + WideToUTF8(title)).c_str()); 266 ("Test Shell - " + WideToUTF8(title)).c_str());
268 } 267 }
269 268
270 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 269 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
271 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str()); 270 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str());
272 } 271 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | webkit/tools/test_shell/test_webview_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698