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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 260623004: Fix to remove customised String over IPC for SmartClip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/android/sys_utils.h" 9 #include "base/android/sys_utils.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 needs_begin_frame_ = enabled; 547 needs_begin_frame_ = enabled;
548 } 548 }
549 549
550 void RenderWidgetHostViewAndroid::OnStartContentIntent( 550 void RenderWidgetHostViewAndroid::OnStartContentIntent(
551 const GURL& content_url) { 551 const GURL& content_url) {
552 if (content_view_core_) 552 if (content_view_core_)
553 content_view_core_->StartContentIntent(content_url); 553 content_view_core_->StartContentIntent(content_url);
554 } 554 }
555 555
556 void RenderWidgetHostViewAndroid::OnSmartClipDataExtracted( 556 void RenderWidgetHostViewAndroid::OnSmartClipDataExtracted(
557 const base::string16& result) { 557 const ViewHostMsg_SmartClip_Params& params) {
558 // Custom serialization over IPC isn't allowed normally for security reasons.
559 // Since this feature is only used in (single-process) WebView, there are no
560 // security issues. Enforce that it's only called in single process mode.
561 CHECK(RenderProcessHost::run_renderer_in_process());
562 if (content_view_core_) 558 if (content_view_core_)
563 content_view_core_->OnSmartClipDataExtracted(result); 559 content_view_core_->OnSmartClipDataExtracted(params.clip_rect,
560 params.clip_data);
564 } 561 }
565 562
566 bool RenderWidgetHostViewAndroid::OnTouchEvent( 563 bool RenderWidgetHostViewAndroid::OnTouchEvent(
567 const ui::MotionEvent& event) { 564 const ui::MotionEvent& event) {
568 if (!host_) 565 if (!host_)
569 return false; 566 return false;
570 567
571 if (!gesture_provider_.OnTouchEvent(event)) 568 if (!gesture_provider_.OnTouchEvent(event))
572 return false; 569 return false;
573 570
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 // RenderWidgetHostView, public: 1468 // RenderWidgetHostView, public:
1472 1469
1473 // static 1470 // static
1474 RenderWidgetHostView* 1471 RenderWidgetHostView*
1475 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1472 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1476 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1473 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1477 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1474 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1478 } 1475 }
1479 1476
1480 } // namespace content 1477 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698