OLD | NEW |
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/browser/printing/print_preview_tab_controller.h" | 5 #include "chrome/browser/printing/print_preview_tab_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "content/public/browser/navigation_entry.h" | 33 #include "content/public/browser/navigation_entry.h" |
34 #include "content/public/browser/notification_details.h" | 34 #include "content/public/browser/notification_details.h" |
35 #include "content/public/browser/notification_source.h" | 35 #include "content/public/browser/notification_source.h" |
36 #include "content/public/browser/notification_types.h" | 36 #include "content/public/browser/notification_types.h" |
37 #include "content/public/browser/render_process_host.h" | 37 #include "content/public/browser/render_process_host.h" |
38 #include "content/public/browser/render_view_host.h" | 38 #include "content/public/browser/render_view_host.h" |
39 #include "content/public/browser/render_view_host_delegate.h" | 39 #include "content/public/browser/render_view_host_delegate.h" |
40 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
41 #include "webkit/plugins/webplugininfo.h" | 41 #include "webkit/plugins/webplugininfo.h" |
42 | 42 |
| 43 using content::NativeWebKeyboardEvent; |
43 using content::NavigationController; | 44 using content::NavigationController; |
44 using content::WebContents; | 45 using content::WebContents; |
45 using content::WebUIMessageHandler; | 46 using content::WebUIMessageHandler; |
46 | 47 |
47 namespace { | 48 namespace { |
48 | 49 |
49 void EnableInternalPDFPluginForTab(TabContentsWrapper* preview_tab) { | 50 void EnableInternalPDFPluginForTab(TabContentsWrapper* preview_tab) { |
50 // Always enable the internal PDF plugin for the print preview page. | 51 // Always enable the internal PDF plugin for the print preview page. |
51 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( | 52 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( |
52 preview_tab->web_contents()->GetRenderProcessHost()->GetID(), | 53 preview_tab->web_contents()->GetRenderProcessHost()->GetID(), |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( | 542 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( |
542 preview_tab->web_contents()->GetWebUI()->GetController()); | 543 preview_tab->web_contents()->GetWebUI()->GetController()); |
543 if (print_preview_ui) | 544 if (print_preview_ui) |
544 print_preview_ui->OnTabDestroyed(); | 545 print_preview_ui->OnTabDestroyed(); |
545 | 546 |
546 preview_tab_map_.erase(preview_tab); | 547 preview_tab_map_.erase(preview_tab); |
547 RemoveObservers(preview_tab); | 548 RemoveObservers(preview_tab); |
548 } | 549 } |
549 | 550 |
550 } // namespace printing | 551 } // namespace printing |
OLD | NEW |