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 "chrome/browser/extensions/extension_web_ui.h" | 5 #include "chrome/browser/extensions/extension_web_ui.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 profile)->enabled_extensions().GetExtensionOrAppByURL(url); | 340 profile)->enabled_extensions().GetExtensionOrAppByURL(url); |
341 DCHECK(extension); | 341 DCHECK(extension); |
342 | 342 |
343 // The base class defaults to enabling WebUI bindings, but we don't need | 343 // The base class defaults to enabling WebUI bindings, but we don't need |
344 // those (this is also reflected in ChromeWebUIControllerFactory:: | 344 // those (this is also reflected in ChromeWebUIControllerFactory:: |
345 // UseWebUIBindingsForURL). | 345 // UseWebUIBindingsForURL). |
346 int bindings = 0; | 346 int bindings = 0; |
347 web_ui->SetBindings(bindings); | 347 web_ui->SetBindings(bindings); |
348 | 348 |
349 // Hack: A few things we specialize just for the bookmark manager. | 349 // Hack: A few things we specialize just for the bookmark manager. |
350 if (extension->id() == extension_misc::kBookmarkManagerId) { | 350 if (extension->id() == extension_misc::kBookmarkManagerId || |
| 351 extension->id() == extension_misc::kMDBookmarkManagerId) { |
351 bookmark_manager_private_drag_event_router_.reset( | 352 bookmark_manager_private_drag_event_router_.reset( |
352 new extensions::BookmarkManagerPrivateDragEventRouter( | 353 new extensions::BookmarkManagerPrivateDragEventRouter( |
353 profile, web_ui->GetWebContents())); | 354 profile, web_ui->GetWebContents())); |
354 | 355 |
355 web_ui->SetLinkTransitionType(ui::PAGE_TRANSITION_AUTO_BOOKMARK); | 356 web_ui->SetLinkTransitionType(ui::PAGE_TRANSITION_AUTO_BOOKMARK); |
356 } | 357 } |
357 } | 358 } |
358 | 359 |
359 ExtensionWebUI::~ExtensionWebUI() {} | 360 ExtensionWebUI::~ExtensionWebUI() {} |
360 | 361 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, | 561 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, |
561 gfx::Size(pixel_size, pixel_size), | 562 gfx::Size(pixel_size, pixel_size), |
562 resource_scale_factor)); | 563 resource_scale_factor)); |
563 } | 564 } |
564 | 565 |
565 // LoadImagesAsync actually can run callback synchronously. We want to force | 566 // LoadImagesAsync actually can run callback synchronously. We want to force |
566 // async. | 567 // async. |
567 extensions::ImageLoader::Get(profile)->LoadImagesAsync( | 568 extensions::ImageLoader::Get(profile)->LoadImagesAsync( |
568 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); | 569 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); |
569 } | 570 } |
OLD | NEW |