| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues
t.h" | 5 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues
t.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "components/guest_view/common/guest_view_constants.h" | 10 #include "components/guest_view/common/guest_view_constants.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 content::NavigationEntry* last_committed_entry = | 182 content::NavigationEntry* last_committed_entry = |
| 183 embedder_web_contents()->GetController().GetLastCommittedEntry(); | 183 embedder_web_contents()->GetController().GetLastCommittedEntry(); |
| 184 if (last_committed_entry) { | 184 if (last_committed_entry) { |
| 185 last_committed_entry->SetTitle(source->GetTitle()); | 185 last_committed_entry->SetTitle(source->GetTitle()); |
| 186 embedder_web_contents()->GetDelegate()->NavigationStateChanged( | 186 embedder_web_contents()->GetDelegate()->NavigationStateChanged( |
| 187 embedder_web_contents(), changed_flags); | 187 embedder_web_contents(), changed_flags); |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 bool MimeHandlerViewGuest::HandleContextMenu( | 191 bool MimeHandlerViewGuest::HandleContextMenu( |
| 192 RenderFrameHost* render_frame_host, |
| 192 const content::ContextMenuParams& params) { | 193 const content::ContextMenuParams& params) { |
| 193 if (delegate_) | 194 if (delegate_) |
| 194 return delegate_->HandleContextMenu(web_contents(), params); | 195 return delegate_->HandleContextMenu(web_contents(), params); |
| 195 | 196 |
| 196 return false; | 197 return false; |
| 197 } | 198 } |
| 198 | 199 |
| 199 bool MimeHandlerViewGuest::PreHandleGestureEvent( | 200 bool MimeHandlerViewGuest::PreHandleGestureEvent( |
| 200 WebContents* source, | 201 WebContents* source, |
| 201 const blink::WebGestureEvent& event) { | 202 const blink::WebGestureEvent& event) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 element_instance_id())); | 236 element_instance_id())); |
| 236 } | 237 } |
| 237 | 238 |
| 238 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { | 239 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { |
| 239 if (!stream_) | 240 if (!stream_) |
| 240 return base::WeakPtr<StreamContainer>(); | 241 return base::WeakPtr<StreamContainer>(); |
| 241 return stream_->GetWeakPtr(); | 242 return stream_->GetWeakPtr(); |
| 242 } | 243 } |
| 243 | 244 |
| 244 } // namespace extensions | 245 } // namespace extensions |
| OLD | NEW |