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

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

Issue 2706363002: Add Finch flag for Copyless Paste (Closed)
Patch Set: Created 3 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
« chrome/app/generated_resources.grd ('K') | « chrome/renderer/DEPS ('k') | no next file » | 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/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "chrome/renderer/searchbox/search_bouncer.h" 60 #include "chrome/renderer/searchbox/search_bouncer.h"
61 #include "chrome/renderer/searchbox/searchbox.h" 61 #include "chrome/renderer/searchbox/searchbox.h"
62 #include "chrome/renderer/searchbox/searchbox_extension.h" 62 #include "chrome/renderer/searchbox/searchbox_extension.h"
63 #include "chrome/renderer/tts_dispatcher.h" 63 #include "chrome/renderer/tts_dispatcher.h"
64 #include "chrome/renderer/worker_content_settings_client_proxy.h" 64 #include "chrome/renderer/worker_content_settings_client_proxy.h"
65 #include "components/autofill/content/renderer/autofill_agent.h" 65 #include "components/autofill/content/renderer/autofill_agent.h"
66 #include "components/autofill/content/renderer/password_autofill_agent.h" 66 #include "components/autofill/content/renderer/password_autofill_agent.h"
67 #include "components/autofill/content/renderer/password_generation_agent.h" 67 #include "components/autofill/content/renderer/password_generation_agent.h"
68 #include "components/content_settings/core/common/content_settings_pattern.h" 68 #include "components/content_settings/core/common/content_settings_pattern.h"
69 #include "components/contextual_search/renderer/overlay_js_render_frame_observer .h" 69 #include "components/contextual_search/renderer/overlay_js_render_frame_observer .h"
70 #include "components/copyless_paste/renderer/copyless_paste_agent.h"
70 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h" 71 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h"
71 #include "components/dom_distiller/content/renderer/distillability_agent.h" 72 #include "components/dom_distiller/content/renderer/distillability_agent.h"
72 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h" 73 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h"
73 #include "components/dom_distiller/core/dom_distiller_switches.h" 74 #include "components/dom_distiller/core/dom_distiller_switches.h"
74 #include "components/dom_distiller/core/url_constants.h" 75 #include "components/dom_distiller/core/url_constants.h"
75 #include "components/error_page/common/localized_error.h" 76 #include "components/error_page/common/localized_error.h"
76 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" 77 #include "components/network_hints/renderer/prescient_networking_dispatcher.h"
77 #include "components/password_manager/content/renderer/credential_manager_client .h" 78 #include "components/password_manager/content/renderer/credential_manager_client .h"
78 #include "components/pdf/renderer/pepper_pdf_host.h" 79 #include "components/pdf/renderer/pepper_pdf_host.h"
79 #include "components/signin/core/common/profile_management_switches.h" 80 #include "components/signin/core/common/profile_management_switches.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 new dom_distiller::DistillerJsRenderFrameObserver( 533 new dom_distiller::DistillerJsRenderFrameObserver(
533 render_frame, chrome::ISOLATED_WORLD_ID_CHROME_INTERNAL); 534 render_frame, chrome::ISOLATED_WORLD_ID_CHROME_INTERNAL);
534 535
535 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 536 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
536 if (command_line->HasSwitch(switches::kEnableDistillabilityService)) { 537 if (command_line->HasSwitch(switches::kEnableDistillabilityService)) {
537 // Create DistillabilityAgent to send distillability updates to 538 // Create DistillabilityAgent to send distillability updates to
538 // DistillabilityDriver in the browser process. 539 // DistillabilityDriver in the browser process.
539 new dom_distiller::DistillabilityAgent(render_frame); 540 new dom_distiller::DistillabilityAgent(render_frame);
540 } 541 }
541 542
543 #if defined(OS_ANDROID)
544 if (chrome_observer_.get() && !chrome_observer_->is_incognito_process()) {
Nico 2017/02/22 02:35:44 instead of if (a && b) if (c) d() do
wychen 2017/02/22 23:06:55 Done.
545 if (base::FeatureList::IsEnabled(features::kCopylessPaste)) {
546 new copyless_paste::CopylessPasteAgent(render_frame);
Nico 2017/02/22 02:35:44 add a "// deletes itself" comment or something lik
wychen 2017/02/22 23:06:55 Done.
547 }
548 }
549 #endif
550
542 // Set up a mojo service to test if this page is a contextual search page. 551 // Set up a mojo service to test if this page is a contextual search page.
543 new contextual_search::OverlayJsRenderFrameObserver(render_frame); 552 new contextual_search::OverlayJsRenderFrameObserver(render_frame);
544 553
545 PasswordAutofillAgent* password_autofill_agent = 554 PasswordAutofillAgent* password_autofill_agent =
546 new PasswordAutofillAgent(render_frame); 555 new PasswordAutofillAgent(render_frame);
547 PasswordGenerationAgent* password_generation_agent = 556 PasswordGenerationAgent* password_generation_agent =
548 new PasswordGenerationAgent(render_frame, password_autofill_agent); 557 new PasswordGenerationAgent(render_frame, password_autofill_agent);
549 new AutofillAgent(render_frame, password_autofill_agent, 558 new AutofillAgent(render_frame, password_autofill_agent,
550 password_generation_agent); 559 password_generation_agent);
551 560
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 std::vector<base::SchedulerWorkerPoolParams>* params_vector, 1519 std::vector<base::SchedulerWorkerPoolParams>* params_vector,
1511 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* 1520 base::TaskScheduler::WorkerPoolIndexForTraitsCallback*
1512 index_to_traits_callback) { 1521 index_to_traits_callback) {
1513 DCHECK(params_vector); 1522 DCHECK(params_vector);
1514 DCHECK(index_to_traits_callback); 1523 DCHECK(index_to_traits_callback);
1515 // If this call fails, content will fall back to the default params. 1524 // If this call fails, content will fall back to the default params.
1516 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); 1525 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams();
1517 *index_to_traits_callback = 1526 *index_to_traits_callback =
1518 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); 1527 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits);
1519 } 1528 }
OLDNEW
« chrome/app/generated_resources.grd ('K') | « chrome/renderer/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698