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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 const GURL& url) { | 1525 const GURL& url) { |
1526 if (!url.is_valid()) { | 1526 if (!url.is_valid()) { |
1527 callback.Run(false); | 1527 callback.Run(false); |
1528 return; | 1528 return; |
1529 } | 1529 } |
1530 | 1530 |
1531 delegate_->CanDownload(request_method, url, callback); | 1531 delegate_->CanDownload(request_method, url, callback); |
1532 } | 1532 } |
1533 | 1533 |
1534 } // namespace content | 1534 } // namespace content |
OLD | NEW |