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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 public: | 170 public: |
171 explicit EmbedderWebContentsObserver(BrowserPluginGuest* guest) | 171 explicit EmbedderWebContentsObserver(BrowserPluginGuest* guest) |
172 : WebContentsObserver(guest->embedder_web_contents()), | 172 : WebContentsObserver(guest->embedder_web_contents()), |
173 browser_plugin_guest_(guest) { | 173 browser_plugin_guest_(guest) { |
174 } | 174 } |
175 | 175 |
176 virtual ~EmbedderWebContentsObserver() { | 176 virtual ~EmbedderWebContentsObserver() { |
177 } | 177 } |
178 | 178 |
179 // WebContentsObserver: | 179 // WebContentsObserver: |
180 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { | 180 virtual void WebContentsDestroyed() OVERRIDE { |
181 browser_plugin_guest_->EmbedderDestroyed(); | 181 browser_plugin_guest_->EmbedderDestroyed(); |
182 } | 182 } |
183 | 183 |
184 virtual void WasShown() OVERRIDE { | 184 virtual void WasShown() OVERRIDE { |
185 browser_plugin_guest_->EmbedderVisibilityChanged(true); | 185 browser_plugin_guest_->EmbedderVisibilityChanged(true); |
186 } | 186 } |
187 | 187 |
188 virtual void WasHidden() OVERRIDE { | 188 virtual void WasHidden() OVERRIDE { |
189 browser_plugin_guest_->EmbedderVisibilityChanged(false); | 189 browser_plugin_guest_->EmbedderVisibilityChanged(false); |
190 } | 190 } |
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 const GURL& url) { | 1557 const GURL& url) { |
1558 if (!url.is_valid()) { | 1558 if (!url.is_valid()) { |
1559 callback.Run(false); | 1559 callback.Run(false); |
1560 return; | 1560 return; |
1561 } | 1561 } |
1562 | 1562 |
1563 delegate_->CanDownload(request_method, url, callback); | 1563 delegate_->CanDownload(request_method, url, callback); |
1564 } | 1564 } |
1565 | 1565 |
1566 } // namespace content | 1566 } // namespace content |
OLD | NEW |