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/ui/pdf/pdf_tab_helper.h" | 5 #include "chrome/browser/ui/pdf/pdf_tab_helper.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/browser_finder.h" | 8 #include "chrome/browser/ui/browser_finder.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 #include "chrome/browser/ui/omnibox/location_bar.h" | 10 #include "chrome/browser/ui/omnibox/location_bar.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const content::LoadCommittedDetails& details, | 42 const content::LoadCommittedDetails& details, |
43 const content::FrameNavigateParams& params) { | 43 const content::FrameNavigateParams& params) { |
44 if (open_in_reader_prompt_.get() && | 44 if (open_in_reader_prompt_.get() && |
45 open_in_reader_prompt_->ShouldExpire(details)) { | 45 open_in_reader_prompt_->ShouldExpire(details)) { |
46 open_in_reader_prompt_.reset(); | 46 open_in_reader_prompt_.reset(); |
47 UpdateLocationBar(); | 47 UpdateLocationBar(); |
48 } | 48 } |
49 } | 49 } |
50 | 50 |
51 void PDFTabHelper::UpdateLocationBar() { | 51 void PDFTabHelper::UpdateLocationBar() { |
52 Browser* browser = browser::FindBrowserWithWebContents(web_contents()); | 52 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); |
53 if (!browser) | 53 if (!browser) |
54 return; | 54 return; |
55 | 55 |
56 BrowserWindow* window = browser->window(); | 56 BrowserWindow* window = browser->window(); |
57 if (!window) | 57 if (!window) |
58 return; | 58 return; |
59 | 59 |
60 LocationBar* location_bar = window->GetLocationBar(); | 60 LocationBar* location_bar = window->GetLocationBar(); |
61 if (!location_bar) | 61 if (!location_bar) |
62 return; | 62 return; |
63 | 63 |
64 location_bar->UpdateOpenPDFInReaderPrompt(); | 64 location_bar->UpdateOpenPDFInReaderPrompt(); |
65 } | 65 } |
66 | 66 |
67 void PDFTabHelper::OnPDFHasUnsupportedFeature() { | 67 void PDFTabHelper::OnPDFHasUnsupportedFeature() { |
68 PDFHasUnsupportedFeature(web_contents()); | 68 PDFHasUnsupportedFeature(web_contents()); |
69 } | 69 } |
OLD | NEW |