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

Side by Side Diff: extensions/browser/guest_view/guest_view_base.cc

Issue 497843002: GuestViews should be able to specify task manager entries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/guest_view_base.h" 5 #include "extensions/browser/guest_view/guest_view_base.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 if (!IsDragAndDropEnabled()) { 353 if (!IsDragAndDropEnabled()) {
354 const char script[] = "window.addEventListener('dragstart', function() { " 354 const char script[] = "window.addEventListener('dragstart', function() { "
355 " window.event.preventDefault(); " 355 " window.event.preventDefault(); "
356 "});"; 356 "});";
357 render_view_host->GetMainFrame()->ExecuteJavaScript( 357 render_view_host->GetMainFrame()->ExecuteJavaScript(
358 base::ASCIIToUTF16(script)); 358 base::ASCIIToUTF16(script));
359 } 359 }
360 DidStopLoading(); 360 DidStopLoading();
361 } 361 }
362 362
363 base::string16 GuestViewBase::GetTaskName() const {
364 return base::string16();
365 }
366
363 void GuestViewBase::RenderViewReady() { 367 void GuestViewBase::RenderViewReady() {
364 GuestReady(); 368 GuestReady();
365 content::RenderViewHost* rvh = guest_web_contents()->GetRenderViewHost(); 369 content::RenderViewHost* rvh = guest_web_contents()->GetRenderViewHost();
366 if (auto_size_enabled_) { 370 if (auto_size_enabled_) {
367 rvh->EnableAutoResize(min_auto_size_, max_auto_size_); 371 rvh->EnableAutoResize(min_auto_size_, max_auto_size_);
368 } else { 372 } else {
369 rvh->DisableAutoResize(element_size_); 373 rvh->DisableAutoResize(element_size_);
370 } 374 }
371 } 375 }
372 376
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 guest_web_contents); 443 guest_web_contents);
440 callback.Run(guest_web_contents); 444 callback.Run(guest_web_contents);
441 } 445 }
442 446
443 // static 447 // static
444 void GuestViewBase::RegisterGuestViewTypes() { 448 void GuestViewBase::RegisterGuestViewTypes() {
445 ExtensionsAPIClient::Get()->RegisterGuestViewTypes(); 449 ExtensionsAPIClient::Get()->RegisterGuestViewTypes();
446 } 450 }
447 451
448 } // namespace extensions 452 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698