Home | History | Annotate | Download | only in custom_handlers

Lines Matching refs:registry

125       ProtocolHandlerRegistry* registry) OVERRIDE;
168 FakeClientObserver(ProtocolHandlerRegistry* registry,
170 : ProtocolHandlerRegistry::DefaultClientObserver(registry),
218 FakeDelegate::CreateShellObserver(ProtocolHandlerRegistry* registry) {
219 return new FakeClientObserver(registry, this);
255 ProtocolHandlerRegistry* registry)
256 : local_registry_(registry),
315 ProtocolHandlerRegistry* registry() { return registry_.get(); }
339 // Returns a new registry, initializing it if |initialize| is true.
350 // Registry owns the delegate_ it handles deletion of that object.
373 FakeDelegate* delegate_; // Registry assumes ownership of delegate_.
410 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
411 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
412 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
417 registry()->OnDenyRegisterProtocolHandler(test_protocol_handler());
418 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
419 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
420 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
424 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
425 registry()->ClearDefault("test");
426 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
427 ASSERT_TRUE(registry()->GetHandlerFor("test").IsEmpty());
432 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
435 registry()->Disable();
437 registry()->Enable();
442 registry()->OnIgnoreRegisterProtocolHandler(test_protocol_handler());
443 ASSERT_TRUE(registry()->IsIgnored(test_protocol_handler()));
445 registry()->RemoveIgnoredHandler(test_protocol_handler());
446 ASSERT_FALSE(registry()->IsIgnored(test_protocol_handler()));
455 registry()->OnIgnoreRegisterProtocolHandler(ph1);
456 ASSERT_TRUE(registry()->IsIgnored(ph1));
457 ASSERT_TRUE(registry()->HasIgnoredEquivalent(ph2));
459 registry()->RemoveIgnoredHandler(ph1);
460 ASSERT_FALSE(registry()->IsIgnored(ph1));
461 ASSERT_FALSE(registry()->HasIgnoredEquivalent(ph2));
467 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
468 registry()->OnIgnoreRegisterProtocolHandler(stuff_protocol_handler);
470 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
471 ASSERT_TRUE(registry()->IsIgnored(stuff_protocol_handler));
474 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
475 ASSERT_TRUE(registry()->IsIgnored(stuff_protocol_handler));
479 registry()->Disable();
480 ASSERT_FALSE(registry()->enabled());
481 registry()->Enable();
482 ASSERT_TRUE(registry()->enabled());
488 ASSERT_FALSE(registry()->CanSchemeBeOverridden("test"));
492 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
493 ASSERT_TRUE(registry()->CanSchemeBeOverridden("test"));
494 registry()->RemoveHandler(test_protocol_handler());
495 ASSERT_TRUE(registry()->CanSchemeBeOverridden("test"));
499 registry()->OnAcceptRegisterProtocolHandler(test_protocol_handler());
500 ASSERT_TRUE(registry()->IsDefault(test_protocol_handler()));
506 registry()->OnAcceptRegisterProtocolHandler(ph1);
507 registry()->OnAcceptRegisterProtocolHandler(ph2);
509 registry()->OnAcceptRegisterProtocolHandler(ph1);
510 registry()->ClearDefault("test");
511 ASSERT_FALSE(registry()->IsDefault(ph1));
512 ASSERT_FALSE(registry()->IsDefault(ph2));
518 registry()->OnAcceptRegisterProtocolHandler(ph1);
519 registry()->OnAcceptRegisterProtocolHandler(ph2);
521 registry()->OnAcceptRegisterProtocolHandler(ph2);
522 ASSERT_EQ(ph2, registry()->GetHandlerFor("test"));
523 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
529 registry()->OnAcceptRegisterProtocolHandler(ph1);
530 registry()->OnAcceptRegisterProtocolHandler(ph2);
531 ASSERT_FALSE(registry()->IsDefault(ph1));
532 ASSERT_TRUE(registry()->IsDefault(ph2));
538 registry()->OnAcceptRegisterProtocolHandler(ph1);
539 registry()->OnAcceptRegisterProtocolHandler(ph2);
541 registry()->OnAcceptRegisterProtocolHandler(ph1);
542 ASSERT_TRUE(registry()->IsDefault(ph1));
543 ASSERT_FALSE(registry()->IsDefault(ph2));
545 registry()->OnAcceptRegisterProtocolHandler(ph2);
546 ASSERT_FALSE(registry()->IsDefault(ph1));
547 ASSERT_TRUE(registry()->IsDefault(ph2));
553 registry()->OnDenyRegisterProtocolHandler(ph1);
554 registry()->OnDenyRegisterProtocolHandler(ph2);
556 registry()->OnAcceptRegisterProtocolHandler(ph2);
557 registry()->Disable();
561 ASSERT_FALSE(registry()->enabled());
562 registry()->Enable();
563 ASSERT_FALSE(registry()->IsDefault(ph1));
564 ASSERT_TRUE(registry()->IsDefault(ph2));
567 ASSERT_TRUE(registry()->enabled());
572 registry()->OnAcceptRegisterProtocolHandler(ph1);
573 registry()->OnAcceptRegisterProtocolHandler(ph1);
575 registry()->RemoveHandler(ph1);
576 ASSERT_FALSE(registry()->IsRegistered(ph1));
577 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
583 registry()->OnAcceptRegisterProtocolHandler(ph1);
584 registry()->OnAcceptRegisterProtocolHandler(ph2);
586 ASSERT_TRUE(registry()->IsRegistered(ph1));
594 registry()->OnAcceptRegisterProtocolHandler(ph1);
596 ASSERT_TRUE(registry()->IsRegistered(ph1));
597 ASSERT_TRUE(registry()->HasRegisteredEquivalent(ph2));
610 ASSERT_FALSE(registry()->SilentlyHandleRegisterHandlerRequest(ph1));
611 ASSERT_FALSE(registry()->IsRegistered(ph1));
613 registry()->OnAcceptRegisterProtocolHandler(ph1);
614 ASSERT_TRUE(registry()->IsRegistered(ph1));
616 ASSERT_TRUE(registry()->SilentlyHandleRegisterHandlerRequest(ph2));
617 ASSERT_FALSE(registry()->IsRegistered(ph1));
618 ASSERT_TRUE(registry()->IsRegistered(ph2));
620 ASSERT_FALSE(registry()->SilentlyHandleRegisterHandlerRequest(ph3));
621 ASSERT_FALSE(registry()->IsRegistered(ph3));
623 registry()->OnIgnoreRegisterProtocolHandler(ph3);
624 ASSERT_FALSE(registry()->IsRegistered(ph3));
625 ASSERT_TRUE(registry()->IsIgnored(ph3));
627 ASSERT_TRUE(registry()->SilentlyHandleRegisterHandlerRequest(ph4));
628 ASSERT_FALSE(registry()->IsRegistered(ph4));
629 ASSERT_TRUE(registry()->HasIgnoredEquivalent(ph4));
637 registry()->OnAcceptRegisterProtocolHandler(ph1);
638 registry()->OnAcceptRegisterProtocolHandler(ph2);
639 registry()->OnAcceptRegisterProtocolHandler(ph3);
641 registry()->OnAcceptRegisterProtocolHandler(ph1);
642 registry()->RemoveHandler(ph1);
643 ASSERT_FALSE(registry()->IsDefault(ph1));
650 registry()->OnAcceptRegisterProtocolHandler(ph1);
651 registry()->OnAcceptRegisterProtocolHandler(ph2);
652 registry()->OnAcceptRegisterProtocolHandler(ph3);
655 registry()->GetHandlersFor("test");
665 registry()->GetRegisteredProtocols(&protocols);
668 registry()->GetHandlersFor("test");
671 registry()->GetRegisteredProtocols(&protocols);
676 registry()->GetHandlersFor("test");
677 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
684 registry()->OnAcceptRegisterProtocolHandler(ph1);
688 registry()->Disable();
692 registry()->Enable();
696 registry()->RemoveHandler(ph1);
702 QueryProtocolHandlerOnChange queryer(profile(), registry());
704 registry()->OnAcceptRegisterProtocolHandler(ph1);
710 registry()->OnAcceptRegisterProtocolHandler(ph1);
711 registry()->ClearDefault("test");
713 registry()->GetRegisteredProtocols(&handled_protocols);
720 registry()->OnAcceptRegisterProtocolHandler(ph1);
721 ASSERT_TRUE(registry()->IsHandledProtocol("test"));
722 registry()->Disable();
723 ASSERT_FALSE(registry()->IsHandledProtocol("test"));
738 registry()->OnAcceptRegisterProtocolHandler(ph_do1);
739 registry()->OnDenyRegisterProtocolHandler(ph_dont);
747 registry()->OnAcceptRegisterProtocolHandler(ph_do2);
766 ASSERT_FALSE(registry()->IsHandledProtocol("do"));
767 ASSERT_FALSE(registry()->IsHandledProtocol("dont"));
769 registry()->OnAcceptRegisterProtocolHandler(ph_do);
772 registry()->OnAcceptRegisterProtocolHandler(ph_dont);
774 ASSERT_TRUE(registry()->IsHandledProtocol("do"));
775 ASSERT_EQ(static_cast<size_t>(1), registry()->GetHandlersFor("do").size());
776 ASSERT_FALSE(registry()->IsHandledProtocol("dont"));
777 ASSERT_EQ(static_cast<size_t>(1), registry()->GetHandlersFor("dont").size());
782 registry()->OnAcceptRegisterProtocolHandler(ph1);
786 registry()->CreateJobInterceptorFactory());
794 registry()->OnAcceptRegisterProtocolHandler(ph1);
797 registry()->CreateJobInterceptorFactory());
805 registry()->OnAcceptRegisterProtocolHandler(ph1);
806 registry()->OnAcceptRegisterProtocolHandler(ph2);
807 registry()->OnAcceptRegisterProtocolHandler(ph3);
809 ASSERT_TRUE(registry()->IsDefault(ph3));
810 registry()->RemoveHandler(ph3);
811 ASSERT_TRUE(registry()->IsDefault(ph2));
812 registry()->OnAcceptRegisterProtocolHandler(ph3);
813 ASSERT_TRUE(registry()->IsDefault(ph3));
814 registry()->RemoveHandler(ph2);
815 ASSERT_TRUE(registry()->IsDefault(ph3));
816 registry()->RemoveHandler(ph3);
817 ASSERT_TRUE(registry()->IsDefault(ph1));
824 registry()->OnAcceptRegisterProtocolHandler(ph1);
825 registry()->OnAcceptRegisterProtocolHandler(ph2);
826 registry()->OnAcceptRegisterProtocolHandler(ph3);
827 registry()->RemoveHandler(ph3);
830 registry()->GetHandlersFor("mailto");
840 registry()->OnAcceptRegisterProtocolHandler(ph1);
841 registry()->ClearDefault(scheme);
844 registry()->CreateJobInterceptorFactory());
851 registry()->OnAcceptRegisterProtocolHandler(ph1);
854 registry()->CreateJobInterceptorFactory());
856 registry()->Disable();
865 registry()->OnAcceptRegisterProtocolHandler(ph1);
866 ASSERT_TRUE(registry()->AttemptReplace(ph2));
867 const ProtocolHandler& handler(registry()->GetHandlerFor("mailto"));
878 registry()->OnAcceptRegisterProtocolHandler(ph1);
879 registry()->OnAcceptRegisterProtocolHandler(ph3);
880 ASSERT_TRUE(registry()->AttemptReplace(ph2));
881 const ProtocolHandler& handler(registry()->GetHandlerFor("mailto"));
892 registry()->OnAcceptRegisterProtocolHandler(ph1);
893 registry()->OnAcceptRegisterProtocolHandler(ph2);
896 ASSERT_TRUE(registry()->AttemptReplace(ph3));
897 const ProtocolHandler& handler(registry()->GetHandlerFor("mailto"));
899 registry()->RemoveHandler(ph3);
900 ASSERT_TRUE(registry()->GetHandlerFor("mailto").IsEmpty());
922 registry()->AddPredefinedHandler(CreateProtocolHandler(
924 registry()->InitProtocolSettings();
926 registry()->GetRegisteredProtocols(&protocols);