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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 6576020: Remove Gears from Chrome (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: ready to review Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 const ViewHostMsg_PageHasOSDD_Type& provider_type) { 1962 const ViewHostMsg_PageHasOSDD_Type& provider_type) {
1963 if (!osd_url.is_empty()) 1963 if (!osd_url.is_empty())
1964 Send(new ViewHostMsg_PageHasOSDD(routing_id_, page_id_, osd_url, 1964 Send(new ViewHostMsg_PageHasOSDD(routing_id_, page_id_, osd_url,
1965 provider_type)); 1965 provider_type));
1966 } 1966 }
1967 1967
1968 void RenderView::OnAllowScriptToClose(bool script_can_close) { 1968 void RenderView::OnAllowScriptToClose(bool script_can_close) {
1969 script_can_close_ = script_can_close; 1969 script_can_close_ = script_can_close;
1970 } 1970 }
1971 1971
1972 uint32 RenderView::GetCPBrowsingContext() {
1973 uint32 context = 0;
1974 Send(new ViewHostMsg_GetCPBrowsingContext(&context));
1975 return context;
1976 }
1977
1978 void RenderView::AddSearchProvider( 1972 void RenderView::AddSearchProvider(
1979 const std::string& url, 1973 const std::string& url,
1980 const ViewHostMsg_PageHasOSDD_Type& provider_type) { 1974 const ViewHostMsg_PageHasOSDD_Type& provider_type) {
1981 if (provider_type.type == 1975 if (provider_type.type ==
1982 ViewHostMsg_PageHasOSDD_Type::EXPLICIT_DEFAULT_PROVIDER && 1976 ViewHostMsg_PageHasOSDD_Type::EXPLICIT_DEFAULT_PROVIDER &&
1983 !webview()->mainFrame()->isProcessingUserGesture()) 1977 !webview()->mainFrame()->isProcessingUserGesture())
1984 return; 1978 return;
1985 1979
1986 AddGURLSearchProvider(GURL(url), provider_type); 1980 AddGURLSearchProvider(GURL(url), provider_type);
1987 } 1981 }
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3452 // Check whether we have new encoding name. 3446 // Check whether we have new encoding name.
3453 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); 3447 UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
3454 } 3448 }
3455 3449
3456 void RenderView::didClearWindowObject(WebFrame* frame) { 3450 void RenderView::didClearWindowObject(WebFrame* frame) {
3457 if (BindingsPolicy::is_dom_automation_enabled(enabled_bindings_)) 3451 if (BindingsPolicy::is_dom_automation_enabled(enabled_bindings_))
3458 BindDOMAutomationController(frame); 3452 BindDOMAutomationController(frame);
3459 GURL frame_url = frame->url(); 3453 GURL frame_url = frame->url();
3460 if (BindingsPolicy::is_web_ui_enabled(enabled_bindings_) && 3454 if (BindingsPolicy::is_web_ui_enabled(enabled_bindings_) &&
3461 (frame_url.SchemeIs(chrome::kChromeUIScheme) || 3455 (frame_url.SchemeIs(chrome::kChromeUIScheme) ||
3462 frame_url.SchemeIs(chrome::kGearsScheme) ||
3463 frame_url.SchemeIs(chrome::kDataScheme))) { 3456 frame_url.SchemeIs(chrome::kDataScheme))) {
3464 GetWebUIBindings()->set_message_sender(this); 3457 GetWebUIBindings()->set_message_sender(this);
3465 GetWebUIBindings()->set_routing_id(routing_id_); 3458 GetWebUIBindings()->set_routing_id(routing_id_);
3466 GetWebUIBindings()->BindToJavascript(frame, "chrome"); 3459 GetWebUIBindings()->BindToJavascript(frame, "chrome");
3467 } 3460 }
3468 if (BindingsPolicy::is_external_host_enabled(enabled_bindings_)) { 3461 if (BindingsPolicy::is_external_host_enabled(enabled_bindings_)) {
3469 GetExternalHostBindings()->set_message_sender(this); 3462 GetExternalHostBindings()->set_message_sender(this);
3470 GetExternalHostBindings()->set_routing_id(routing_id_); 3463 GetExternalHostBindings()->set_routing_id(routing_id_);
3471 GetExternalHostBindings()->BindToJavascript(frame, "externalHost"); 3464 GetExternalHostBindings()->BindToJavascript(frame, "externalHost");
3472 } 3465 }
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
3993 void RenderView::DidStartLoadingForPlugin() { 3986 void RenderView::DidStartLoadingForPlugin() {
3994 // TODO(darin): Make is_loading_ be a counter! 3987 // TODO(darin): Make is_loading_ be a counter!
3995 didStartLoading(); 3988 didStartLoading();
3996 } 3989 }
3997 3990
3998 void RenderView::DidStopLoadingForPlugin() { 3991 void RenderView::DidStopLoadingForPlugin() {
3999 // TODO(darin): Make is_loading_ be a counter! 3992 // TODO(darin): Make is_loading_ be a counter!
4000 didStopLoading(); 3993 didStopLoading();
4001 } 3994 }
4002 3995
4003 void RenderView::ShowModalHTMLDialogForPlugin(
4004 const GURL& url,
4005 const gfx::Size& size,
4006 const std::string& json_arguments,
4007 std::string* json_retval) {
4008 SendAndRunNestedMessageLoop(new ViewHostMsg_ShowModalHTMLDialog(
4009 routing_id_, url, size.width(), size.height(), json_arguments,
4010 json_retval));
4011 }
4012
4013 WebCookieJar* RenderView::GetCookieJar() { 3996 WebCookieJar* RenderView::GetCookieJar() {
4014 return &cookie_jar_; 3997 return &cookie_jar_;
4015 } 3998 }
4016 3999
4017 void RenderView::SyncNavigationState() { 4000 void RenderView::SyncNavigationState() {
4018 if (!webview()) 4001 if (!webview())
4019 return; 4002 return;
4020 4003
4021 const WebHistoryItem& item = webview()->mainFrame()->currentHistoryItem(); 4004 const WebHistoryItem& item = webview()->mainFrame()->currentHistoryItem();
4022 if (item.isNull()) 4005 if (item.isNull())
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
5697 } 5680 }
5698 } 5681 }
5699 5682
5700 void RenderView::OnContextMenuClosed( 5683 void RenderView::OnContextMenuClosed(
5701 const webkit_glue::CustomContextMenuContext& custom_context) { 5684 const webkit_glue::CustomContextMenuContext& custom_context) {
5702 if (custom_context.is_pepper_menu) 5685 if (custom_context.is_pepper_menu)
5703 pepper_delegate_.OnContextMenuClosed(custom_context); 5686 pepper_delegate_.OnContextMenuClosed(custom_context);
5704 else 5687 else
5705 context_menu_node_.reset(); 5688 context_menu_node_.reset();
5706 } 5689 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698