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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 content::WebContents* web_contents) const { | 204 content::WebContents* web_contents) const { |
205 return false; | 205 return false; |
206 } | 206 } |
207 | 207 |
208 void PrintPreviewWebContentDelegate::HandleKeyboardEvent( | 208 void PrintPreviewWebContentDelegate::HandleKeyboardEvent( |
209 WebContents* source, | 209 WebContents* source, |
210 const NativeWebKeyboardEvent& event) { | 210 const NativeWebKeyboardEvent& event) { |
211 // Disabled on Mac due to http://crbug.com/112173 | 211 // Disabled on Mac due to http://crbug.com/112173 |
212 #if !defined(OS_MACOSX) | 212 #if !defined(OS_MACOSX) |
213 Browser* current_browser = | 213 Browser* current_browser = |
214 browser::FindBrowserWithWebContents(tab_->web_contents()); | 214 chrome::FindBrowserWithWebContents(tab_->web_contents()); |
215 if (!current_browser) | 215 if (!current_browser) |
216 return; | 216 return; |
217 current_browser->window()->HandleKeyboardEvent(event); | 217 current_browser->window()->HandleKeyboardEvent(event); |
218 #endif | 218 #endif |
219 } | 219 } |
220 | 220 |
221 } // namespace | 221 } // namespace |
222 | 222 |
223 namespace printing { | 223 namespace printing { |
224 | 224 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( | 543 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( |
544 preview_tab->web_contents()->GetWebUI()->GetController()); | 544 preview_tab->web_contents()->GetWebUI()->GetController()); |
545 if (print_preview_ui) | 545 if (print_preview_ui) |
546 print_preview_ui->OnTabDestroyed(); | 546 print_preview_ui->OnTabDestroyed(); |
547 | 547 |
548 preview_tab_map_.erase(preview_tab); | 548 preview_tab_map_.erase(preview_tab); |
549 RemoveObservers(preview_tab); | 549 RemoveObservers(preview_tab); |
550 } | 550 } |
551 | 551 |
552 } // namespace printing | 552 } // namespace printing |
OLD | NEW |