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

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: windows fixes Created 9 years, 9 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/renderer/render_view.h ('k') | chrome/renderer/renderer_glue.cc » ('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) 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 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 const ViewHostMsg_PageHasOSDD_Type& provider_type) { 1972 const ViewHostMsg_PageHasOSDD_Type& provider_type) {
1973 if (!osd_url.is_empty()) 1973 if (!osd_url.is_empty())
1974 Send(new ViewHostMsg_PageHasOSDD(routing_id_, page_id_, osd_url, 1974 Send(new ViewHostMsg_PageHasOSDD(routing_id_, page_id_, osd_url,
1975 provider_type)); 1975 provider_type));
1976 } 1976 }
1977 1977
1978 void RenderView::OnAllowScriptToClose(bool script_can_close) { 1978 void RenderView::OnAllowScriptToClose(bool script_can_close) {
1979 script_can_close_ = script_can_close; 1979 script_can_close_ = script_can_close;
1980 } 1980 }
1981 1981
1982 uint32 RenderView::GetCPBrowsingContext() {
1983 uint32 context = 0;
1984 Send(new ViewHostMsg_GetCPBrowsingContext(&context));
1985 return context;
1986 }
1987
1988 void RenderView::AddSearchProvider( 1982 void RenderView::AddSearchProvider(
1989 const std::string& url, 1983 const std::string& url,
1990 const ViewHostMsg_PageHasOSDD_Type& provider_type) { 1984 const ViewHostMsg_PageHasOSDD_Type& provider_type) {
1991 if (provider_type.type == 1985 if (provider_type.type ==
1992 ViewHostMsg_PageHasOSDD_Type::EXPLICIT_DEFAULT_PROVIDER && 1986 ViewHostMsg_PageHasOSDD_Type::EXPLICIT_DEFAULT_PROVIDER &&
1993 !webview()->mainFrame()->isProcessingUserGesture()) 1987 !webview()->mainFrame()->isProcessingUserGesture())
1994 return; 1988 return;
1995 1989
1996 AddGURLSearchProvider(GURL(url), provider_type); 1990 AddGURLSearchProvider(GURL(url), provider_type);
1997 } 1991 }
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3462 // Check whether we have new encoding name. 3456 // Check whether we have new encoding name.
3463 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); 3457 UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
3464 } 3458 }
3465 3459
3466 void RenderView::didClearWindowObject(WebFrame* frame) { 3460 void RenderView::didClearWindowObject(WebFrame* frame) {
3467 if (BindingsPolicy::is_dom_automation_enabled(enabled_bindings_)) 3461 if (BindingsPolicy::is_dom_automation_enabled(enabled_bindings_))
3468 BindDOMAutomationController(frame); 3462 BindDOMAutomationController(frame);
3469 GURL frame_url = frame->url(); 3463 GURL frame_url = frame->url();
3470 if (BindingsPolicy::is_web_ui_enabled(enabled_bindings_) && 3464 if (BindingsPolicy::is_web_ui_enabled(enabled_bindings_) &&
3471 (frame_url.SchemeIs(chrome::kChromeUIScheme) || 3465 (frame_url.SchemeIs(chrome::kChromeUIScheme) ||
3472 frame_url.SchemeIs(chrome::kGearsScheme) ||
3473 frame_url.SchemeIs(chrome::kDataScheme))) { 3466 frame_url.SchemeIs(chrome::kDataScheme))) {
3474 GetWebUIBindings()->set_message_sender(this); 3467 GetWebUIBindings()->set_message_sender(this);
3475 GetWebUIBindings()->set_routing_id(routing_id_); 3468 GetWebUIBindings()->set_routing_id(routing_id_);
3476 GetWebUIBindings()->BindToJavascript(frame, "chrome"); 3469 GetWebUIBindings()->BindToJavascript(frame, "chrome");
3477 } 3470 }
3478 if (BindingsPolicy::is_external_host_enabled(enabled_bindings_)) { 3471 if (BindingsPolicy::is_external_host_enabled(enabled_bindings_)) {
3479 GetExternalHostBindings()->set_message_sender(this); 3472 GetExternalHostBindings()->set_message_sender(this);
3480 GetExternalHostBindings()->set_routing_id(routing_id_); 3473 GetExternalHostBindings()->set_routing_id(routing_id_);
3481 GetExternalHostBindings()->BindToJavascript(frame, "externalHost"); 3474 GetExternalHostBindings()->BindToJavascript(frame, "externalHost");
3482 } 3475 }
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
3972 void RenderView::DidStartLoadingForPlugin() { 3965 void RenderView::DidStartLoadingForPlugin() {
3973 // TODO(darin): Make is_loading_ be a counter! 3966 // TODO(darin): Make is_loading_ be a counter!
3974 didStartLoading(); 3967 didStartLoading();
3975 } 3968 }
3976 3969
3977 void RenderView::DidStopLoadingForPlugin() { 3970 void RenderView::DidStopLoadingForPlugin() {
3978 // TODO(darin): Make is_loading_ be a counter! 3971 // TODO(darin): Make is_loading_ be a counter!
3979 didStopLoading(); 3972 didStopLoading();
3980 } 3973 }
3981 3974
3982 void RenderView::ShowModalHTMLDialogForPlugin(
3983 const GURL& url,
3984 const gfx::Size& size,
3985 const std::string& json_arguments,
3986 std::string* json_retval) {
3987 SendAndRunNestedMessageLoop(new ViewHostMsg_ShowModalHTMLDialog(
3988 routing_id_, url, size.width(), size.height(), json_arguments,
3989 json_retval));
3990 }
3991
3992 WebCookieJar* RenderView::GetCookieJar() { 3975 WebCookieJar* RenderView::GetCookieJar() {
3993 return &cookie_jar_; 3976 return &cookie_jar_;
3994 } 3977 }
3995 3978
3996 void RenderView::SyncNavigationState() { 3979 void RenderView::SyncNavigationState() {
3997 if (!webview()) 3980 if (!webview())
3998 return; 3981 return;
3999 3982
4000 const WebHistoryItem& item = webview()->mainFrame()->currentHistoryItem(); 3983 const WebHistoryItem& item = webview()->mainFrame()->currentHistoryItem();
4001 if (item.isNull()) 3984 if (item.isNull())
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
4599 void RenderView::OnDragSourceSystemDragEnded() { 4582 void RenderView::OnDragSourceSystemDragEnded() {
4600 webview()->dragSourceSystemDragEnded(); 4583 webview()->dragSourceSystemDragEnded();
4601 } 4584 }
4602 4585
4603 void RenderView::OnDragTargetDragEnter(const WebDropData& drop_data, 4586 void RenderView::OnDragTargetDragEnter(const WebDropData& drop_data,
4604 const gfx::Point& client_point, 4587 const gfx::Point& client_point,
4605 const gfx::Point& screen_point, 4588 const gfx::Point& screen_point,
4606 WebDragOperationsMask ops) { 4589 WebDragOperationsMask ops) {
4607 WebDragOperation operation = webview()->dragTargetDragEnter( 4590 WebDragOperation operation = webview()->dragTargetDragEnter(
4608 drop_data.ToDragData(), 4591 drop_data.ToDragData(),
4609 drop_data.identity, 4592 0, // drag identity, unused
4610 client_point, 4593 client_point,
4611 screen_point, 4594 screen_point,
4612 ops); 4595 ops);
4613 4596
4614 Send(new ViewHostMsg_UpdateDragCursor(routing_id_, operation)); 4597 Send(new ViewHostMsg_UpdateDragCursor(routing_id_, operation));
4615 } 4598 }
4616 4599
4617 void RenderView::OnDragTargetDragOver(const gfx::Point& client_point, 4600 void RenderView::OnDragTargetDragOver(const gfx::Point& client_point,
4618 const gfx::Point& screen_point, 4601 const gfx::Point& screen_point,
4619 WebDragOperationsMask ops) { 4602 WebDragOperationsMask ops) {
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
5626 const webkit_glue::CustomContextMenuContext& custom_context) { 5609 const webkit_glue::CustomContextMenuContext& custom_context) {
5627 if (custom_context.is_pepper_menu) 5610 if (custom_context.is_pepper_menu)
5628 pepper_delegate_.OnContextMenuClosed(custom_context); 5611 pepper_delegate_.OnContextMenuClosed(custom_context);
5629 else 5612 else
5630 context_menu_node_.reset(); 5613 context_menu_node_.reset();
5631 } 5614 }
5632 5615
5633 void RenderView::OnNetworkStateChanged(bool online) { 5616 void RenderView::OnNetworkStateChanged(bool online) {
5634 WebNetworkStateNotifier::setOnLine(online); 5617 WebNetworkStateNotifier::setOnLine(online);
5635 } 5618 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698