Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: chrome/browser/printing/print_preview_tab_controller.cc

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/omnibox_search_hint.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/omnibox_search_hint.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698