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

Side by Side Diff: chrome/browser/ui/pdf/pdf_tab_helper.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
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/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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_controller.cc ('k') | chrome/browser/ui/search/other_device_menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698