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

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 6480106: Add IPCs to check web copy/cut/paste for extensions with the appropriate permission bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: . Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.h » ('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/browser/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 webkit_prefs.allow_scripts_to_close_windows = true; 531 webkit_prefs.allow_scripts_to_close_windows = true;
532 532
533 // Disable anything that requires the GPU process for background pages. 533 // Disable anything that requires the GPU process for background pages.
534 // See http://crbug.com/64512 and http://crbug.com/64841. 534 // See http://crbug.com/64512 and http://crbug.com/64841.
535 if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) { 535 if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) {
536 webkit_prefs.experimental_webgl_enabled = false; 536 webkit_prefs.experimental_webgl_enabled = false;
537 webkit_prefs.accelerated_compositing_enabled = false; 537 webkit_prefs.accelerated_compositing_enabled = false;
538 webkit_prefs.accelerated_2d_canvas_enabled = false; 538 webkit_prefs.accelerated_2d_canvas_enabled = false;
539 } 539 }
540 540
541 // TODO(dcheng): incorporate this setting into kClipboardPermission check.
542 webkit_prefs.javascript_can_access_clipboard = true;
543
544 // TODO(dcheng): check kClipboardPermission instead once it's implemented.
545 if (extension_->HasApiPermission(Extension::kExperimentalPermission))
546 webkit_prefs.dom_paste_enabled = true;
547 return webkit_prefs; 541 return webkit_prefs;
548 } 542 }
549 543
550 RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() { 544 RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() {
551 return this; 545 return this;
552 } 546 }
553 547
554 void ExtensionHost::CreateNewWindow( 548 void ExtensionHost::CreateNewWindow(
555 int route_id, 549 int route_id,
556 const ViewHostMsg_CreateWindow_Params& params) { 550 const ViewHostMsg_CreateWindow_Params& params) {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 return window_id; 828 return window_id;
835 } 829 }
836 830
837 void ExtensionHost::OnRunFileChooser( 831 void ExtensionHost::OnRunFileChooser(
838 const ViewHostMsg_RunFileChooser_Params& params) { 832 const ViewHostMsg_RunFileChooser_Params& params) {
839 if (file_select_helper_.get() == NULL) 833 if (file_select_helper_.get() == NULL)
840 file_select_helper_.reset(new FileSelectHelper(profile())); 834 file_select_helper_.reset(new FileSelectHelper(profile()));
841 file_select_helper_->RunFileChooser(render_view_host_, 835 file_select_helper_->RunFileChooser(render_view_host_,
842 associated_tab_contents(), params); 836 associated_tab_contents(), params);
843 } 837 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698