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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 525793002: Make WebContentsObserver::web_contents() public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 3 months 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 //////////////////////////////////////////////////////////////////////////////// 303 ////////////////////////////////////////////////////////////////////////////////
304 // Browser, InterstitialObserver: 304 // Browser, InterstitialObserver:
305 305
306 class Browser::InterstitialObserver : public content::WebContentsObserver { 306 class Browser::InterstitialObserver : public content::WebContentsObserver {
307 public: 307 public:
308 InterstitialObserver(Browser* browser, content::WebContents* web_contents) 308 InterstitialObserver(Browser* browser, content::WebContents* web_contents)
309 : WebContentsObserver(web_contents), 309 : WebContentsObserver(web_contents),
310 browser_(browser) { 310 browser_(browser) {
311 } 311 }
312 312
313 using content::WebContentsObserver::web_contents;
314
315 virtual void DidAttachInterstitialPage() OVERRIDE { 313 virtual void DidAttachInterstitialPage() OVERRIDE {
316 browser_->UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); 314 browser_->UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
317 } 315 }
318 316
319 virtual void DidDetachInterstitialPage() OVERRIDE { 317 virtual void DidDetachInterstitialPage() OVERRIDE {
320 browser_->UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); 318 browser_->UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
321 } 319 }
322 320
323 private: 321 private:
324 Browser* browser_; 322 Browser* browser_;
(...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 if (contents && !allow_js_access) { 2472 if (contents && !allow_js_access) {
2475 contents->web_contents()->GetController().LoadURL( 2473 contents->web_contents()->GetController().LoadURL(
2476 target_url, 2474 target_url,
2477 content::Referrer(), 2475 content::Referrer(),
2478 content::PAGE_TRANSITION_LINK, 2476 content::PAGE_TRANSITION_LINK,
2479 std::string()); // No extra headers. 2477 std::string()); // No extra headers.
2480 } 2478 }
2481 2479
2482 return contents != NULL; 2480 return contents != NULL;
2483 } 2481 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/chrome_translate_client.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698