| 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/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 } | 340 } |
| 341 | 341 |
| 342 void ExtensionHost::InsertInfobarCSS() { | 342 void ExtensionHost::InsertInfobarCSS() { |
| 343 DCHECK(!is_background_page()); | 343 DCHECK(!is_background_page()); |
| 344 | 344 |
| 345 static const base::StringPiece css( | 345 static const base::StringPiece css( |
| 346 ResourceBundle::GetSharedInstance().GetRawDataResource( | 346 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 347 IDR_EXTENSIONS_INFOBAR_CSS)); | 347 IDR_EXTENSIONS_INFOBAR_CSS)); |
| 348 | 348 |
| 349 render_view_host()->Send(new ViewMsg_CSSInsertRequest( | 349 render_view_host()->Send(new ViewMsg_CSSInsertRequest( |
| 350 render_view_host()->routing_id(), L"", css.as_string())); | 350 render_view_host()->routing_id(), string16(), css.as_string())); |
| 351 } | 351 } |
| 352 | 352 |
| 353 void ExtensionHost::DisableScrollbarsForSmallWindows( | 353 void ExtensionHost::DisableScrollbarsForSmallWindows( |
| 354 const gfx::Size& size_limit) { | 354 const gfx::Size& size_limit) { |
| 355 render_view_host()->Send(new ViewMsg_DisableScrollbarsForSmallWindows( | 355 render_view_host()->Send(new ViewMsg_DisableScrollbarsForSmallWindows( |
| 356 render_view_host()->routing_id(), size_limit)); | 356 render_view_host()->routing_id(), size_limit)); |
| 357 } | 357 } |
| 358 | 358 |
| 359 void ExtensionHost::DidStopLoading() { | 359 void ExtensionHost::DidStopLoading() { |
| 360 bool notify = !did_stop_loading_; | 360 bool notify = !did_stop_loading_; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 } | 790 } |
| 791 } | 791 } |
| 792 | 792 |
| 793 void ExtensionHost::OnRunFileChooser( | 793 void ExtensionHost::OnRunFileChooser( |
| 794 const ViewHostMsg_RunFileChooser_Params& params) { | 794 const ViewHostMsg_RunFileChooser_Params& params) { |
| 795 if (file_select_helper_.get() == NULL) | 795 if (file_select_helper_.get() == NULL) |
| 796 file_select_helper_.reset(new FileSelectHelper(profile())); | 796 file_select_helper_.reset(new FileSelectHelper(profile())); |
| 797 file_select_helper_->RunFileChooser(render_view_host_, | 797 file_select_helper_->RunFileChooser(render_view_host_, |
| 798 GetAssociatedTabContents(), params); | 798 GetAssociatedTabContents(), params); |
| 799 } | 799 } |
| OLD | NEW |