OLD | NEW |
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 //////////////////////////////////////////////////////////////////////////////// | 305 //////////////////////////////////////////////////////////////////////////////// |
306 // Browser, InterstitialObserver: | 306 // Browser, InterstitialObserver: |
307 | 307 |
308 class Browser::InterstitialObserver : public content::WebContentsObserver { | 308 class Browser::InterstitialObserver : public content::WebContentsObserver { |
309 public: | 309 public: |
310 InterstitialObserver(Browser* browser, content::WebContents* web_contents) | 310 InterstitialObserver(Browser* browser, content::WebContents* web_contents) |
311 : WebContentsObserver(web_contents), | 311 : WebContentsObserver(web_contents), |
312 browser_(browser) { | 312 browser_(browser) { |
313 } | 313 } |
314 | 314 |
315 virtual void DidAttachInterstitialPage() override { | 315 void DidAttachInterstitialPage() override { |
316 browser_->UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); | 316 browser_->UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); |
317 } | 317 } |
318 | 318 |
319 virtual void DidDetachInterstitialPage() override { | 319 void DidDetachInterstitialPage() override { |
320 browser_->UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); | 320 browser_->UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); |
321 } | 321 } |
322 | 322 |
323 private: | 323 private: |
324 Browser* browser_; | 324 Browser* browser_; |
325 | 325 |
326 DISALLOW_COPY_AND_ASSIGN(InterstitialObserver); | 326 DISALLOW_COPY_AND_ASSIGN(InterstitialObserver); |
327 }; | 327 }; |
328 | 328 |
329 /////////////////////////////////////////////////////////////////////////////// | 329 /////////////////////////////////////////////////////////////////////////////// |
(...skipping 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 if (contents && !allow_js_access) { | 2495 if (contents && !allow_js_access) { |
2496 contents->web_contents()->GetController().LoadURL( | 2496 contents->web_contents()->GetController().LoadURL( |
2497 target_url, | 2497 target_url, |
2498 content::Referrer(), | 2498 content::Referrer(), |
2499 ui::PAGE_TRANSITION_LINK, | 2499 ui::PAGE_TRANSITION_LINK, |
2500 std::string()); // No extra headers. | 2500 std::string()); // No extra headers. |
2501 } | 2501 } |
2502 | 2502 |
2503 return contents != NULL; | 2503 return contents != NULL; |
2504 } | 2504 } |
OLD | NEW |