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(), L"", css.as_string())); |
351 "InfobarThemeCSS")); | |
352 } | 351 } |
353 | 352 |
354 void ExtensionHost::DisableScrollbarsForSmallWindows( | 353 void ExtensionHost::DisableScrollbarsForSmallWindows( |
355 const gfx::Size& size_limit) { | 354 const gfx::Size& size_limit) { |
356 render_view_host()->Send(new ViewMsg_DisableScrollbarsForSmallWindows( | 355 render_view_host()->Send(new ViewMsg_DisableScrollbarsForSmallWindows( |
357 render_view_host()->routing_id(), size_limit)); | 356 render_view_host()->routing_id(), size_limit)); |
358 } | 357 } |
359 | 358 |
360 void ExtensionHost::DidStopLoading() { | 359 void ExtensionHost::DidStopLoading() { |
361 bool notify = !did_stop_loading_; | 360 bool notify = !did_stop_loading_; |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 } | 790 } |
792 } | 791 } |
793 | 792 |
794 void ExtensionHost::OnRunFileChooser( | 793 void ExtensionHost::OnRunFileChooser( |
795 const ViewHostMsg_RunFileChooser_Params& params) { | 794 const ViewHostMsg_RunFileChooser_Params& params) { |
796 if (file_select_helper_.get() == NULL) | 795 if (file_select_helper_.get() == NULL) |
797 file_select_helper_.reset(new FileSelectHelper(profile())); | 796 file_select_helper_.reset(new FileSelectHelper(profile())); |
798 file_select_helper_->RunFileChooser(render_view_host_, | 797 file_select_helper_->RunFileChooser(render_view_host_, |
799 GetAssociatedTabContents(), params); | 798 GetAssociatedTabContents(), params); |
800 } | 799 } |
OLD | NEW |