| 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 "content/browser/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 public: | 161 public: |
| 162 explicit EmbedderWebContentsObserver(BrowserPluginGuest* guest) | 162 explicit EmbedderWebContentsObserver(BrowserPluginGuest* guest) |
| 163 : WebContentsObserver(guest->embedder_web_contents()), | 163 : WebContentsObserver(guest->embedder_web_contents()), |
| 164 browser_plugin_guest_(guest) { | 164 browser_plugin_guest_(guest) { |
| 165 } | 165 } |
| 166 | 166 |
| 167 virtual ~EmbedderWebContentsObserver() { | 167 virtual ~EmbedderWebContentsObserver() { |
| 168 } | 168 } |
| 169 | 169 |
| 170 // WebContentsObserver: | 170 // WebContentsObserver: |
| 171 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { | 171 virtual void WebContentsDestroyed() OVERRIDE { |
| 172 browser_plugin_guest_->EmbedderDestroyed(); | 172 browser_plugin_guest_->EmbedderDestroyed(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 virtual void WasShown() OVERRIDE { | 175 virtual void WasShown() OVERRIDE { |
| 176 browser_plugin_guest_->EmbedderVisibilityChanged(true); | 176 browser_plugin_guest_->EmbedderVisibilityChanged(true); |
| 177 } | 177 } |
| 178 | 178 |
| 179 virtual void WasHidden() OVERRIDE { | 179 virtual void WasHidden() OVERRIDE { |
| 180 browser_plugin_guest_->EmbedderVisibilityChanged(false); | 180 browser_plugin_guest_->EmbedderVisibilityChanged(false); |
| 181 } | 181 } |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 const GURL& url) { | 1532 const GURL& url) { |
| 1533 if (!url.is_valid()) { | 1533 if (!url.is_valid()) { |
| 1534 callback.Run(false); | 1534 callback.Run(false); |
| 1535 return; | 1535 return; |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 delegate_->CanDownload(request_method, url, callback); | 1538 delegate_->CanDownload(request_method, url, callback); |
| 1539 } | 1539 } |
| 1540 | 1540 |
| 1541 } // namespace content | 1541 } // namespace content |
| OLD | NEW |