OLD | NEW |
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/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 // TODO(dcheng): incorporate this setting into kClipboardPermission check. | 547 // TODO(dcheng): incorporate this setting into kClipboardPermission check. |
548 webkit_prefs.javascript_can_access_clipboard = true; | 548 webkit_prefs.javascript_can_access_clipboard = true; |
549 | 549 |
550 // TODO(dcheng): check kClipboardPermission instead once it's implemented. | 550 // TODO(dcheng): check kClipboardPermission instead once it's implemented. |
551 if (extension_->HasApiPermission(Extension::kExperimentalPermission)) | 551 if (extension_->HasApiPermission(Extension::kExperimentalPermission)) |
552 webkit_prefs.dom_paste_enabled = true; | 552 webkit_prefs.dom_paste_enabled = true; |
553 return webkit_prefs; | 553 return webkit_prefs; |
554 } | 554 } |
555 | 555 |
556 void ExtensionHost::ProcessWebUIMessage( | 556 void ExtensionHost::ProcessWebUIMessage( |
557 const ViewHostMsg_DomMessage_Params& params) { | 557 const ExtensionHostMsg_DomMessage_Params& params) { |
558 if (extension_function_dispatcher_.get()) { | 558 if (extension_function_dispatcher_.get()) { |
559 extension_function_dispatcher_->HandleRequest(params); | 559 extension_function_dispatcher_->HandleRequest(params); |
560 } | 560 } |
561 } | 561 } |
562 | 562 |
563 RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() { | 563 RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() { |
564 return this; | 564 return this; |
565 } | 565 } |
566 | 566 |
567 void ExtensionHost::CreateNewWindow( | 567 void ExtensionHost::CreateNewWindow( |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 } | 840 } |
841 return window_id; | 841 return window_id; |
842 } | 842 } |
843 | 843 |
844 void ExtensionHost::OnRunFileChooser( | 844 void ExtensionHost::OnRunFileChooser( |
845 const ViewHostMsg_RunFileChooser_Params& params) { | 845 const ViewHostMsg_RunFileChooser_Params& params) { |
846 if (file_select_helper_.get() == NULL) | 846 if (file_select_helper_.get() == NULL) |
847 file_select_helper_.reset(new FileSelectHelper(profile())); | 847 file_select_helper_.reset(new FileSelectHelper(profile())); |
848 file_select_helper_->RunFileChooser(render_view_host_, params); | 848 file_select_helper_->RunFileChooser(render_view_host_, params); |
849 } | 849 } |
OLD | NEW |