Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improving comment and removing the NOTREACHED. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // URL of the mime handler will be displayed. 175 // URL of the mime handler will be displayed.
176 if (changed_flags & content::INVALIDATE_TYPE_URL) 176 if (changed_flags & content::INVALIDATE_TYPE_URL)
177 return; 177 return;
178 178
179 if (!is_full_page_plugin()) 179 if (!is_full_page_plugin())
180 return; 180 return;
181 181
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 embedder_web_contents()->UpdateTitleForEntry(last_committed_entry,
186 source->GetTitle());
186 embedder_web_contents()->GetDelegate()->NavigationStateChanged( 187 embedder_web_contents()->GetDelegate()->NavigationStateChanged(
187 embedder_web_contents(), changed_flags); 188 embedder_web_contents(), changed_flags);
188 } 189 }
189 } 190 }
190 191
191 bool MimeHandlerViewGuest::HandleContextMenu( 192 bool MimeHandlerViewGuest::HandleContextMenu(
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
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698